Openshift Q&A
SET – 1 1. What is OpenShift? OpenShift is an open-source container application platform based on Kubernetes. It helps developers develop, deploy, and manage containerized applications. 2. What are the key components of OpenShift? Master: Manages nodes and orchestrates the deployment of containers. Nodes: Run containers and handle workloads. ETCD: Stores cluster configuration data. OpenShift API: Handles API calls. 3. How does OpenShift differ from Kubernetes? OpenShift extends Kubernetes by adding features such as a web console, a built-in CI/CD pipeline, multi-tenant security, and developer tools. It also has stricter security policies. 4. What is Source-to-Image (S2I) in OpenShift? S2I is a process that builds Docker images directly from application source code, making it easier to deploy apps without writing a Dockerfile. It automatically builds a container from source code and deploys it in OpenShift. 5. Explain the difference between DeploymentConfig and Deployment in OpenShift. DeploymentConfig is specific to OpenShift and offers additional control over deployment strategies, hooks, and triggers, whereas Deployment is a Kubernetes native resource for deploying containerized apps. 6. How does OpenShift manage storage and persistent volumes? OpenShift uses Persistent Volume (PV) and Persistent Volume Claim (PVC) to provide dynamic and static storage for containerized applications. It supports different storage backends like NFS, AWS EBS, and GlusterFS. 7. How do you handle multi-tenancy and security in OpenShift? OpenShift uses Role-Based Access Control (RBAC), Security Context Constraints (SCC), and Network Policies to handle multi-tenancy. SCCs define the security rules for pods, and RBAC defines access control based on user roles. 8. Explain how you would implement CI/CD pipelines in OpenShift. OpenShift has a native Jenkins integration for automating CI/CD pipelines. It can be set up using OpenShift’s BuildConfigs and Jenkins Pipelines to automate testing, building, and deploying applications. 9. What is OpenShift Operator Framework, and why is it important? The Operator Framework in OpenShift automates the deployment, scaling, and lifecycle management of Kubernetes applications. It allows applications to be managed in the same way Kubernetes manages its components. 10. How would you design a highly available OpenShift cluster across multiple regions? Use a multi-region architecture with disaster recovery features. Utilize load balancers (like F5 or HAProxy), configure etcd clusters for consistency, and use persistent storage replicated across regions. Also, use Cluster Federation for managing multiple clusters. SET – 2 1. What is an OpenShift project, and how is it used? An OpenShift project is a logical grouping of resources, such as applications, builds, and deployments. It provides a way to organize and manage resources within a cluster. 2. How do you secure an OpenShift cluster? Implementing RBAC to limit access. Using Network Policies to control traffic between pods. Enabling SELinux and Security Context Constraints to enforce pod-level security. Encrypting sensitive data in etcd and using TLS for securing communication. 3. How would you perform an OpenShift cluster upgrade? Plan upgrades by checking the OpenShift compatibility matrix, backing up etcd, and testing the upgrade in a staging environment. Perform upgrades using the OpenShift Command-Line Interface (CLI) and ensure high availability by performing a rolling upgrade. 4. Explain the concept of a pod in OpenShift. A pod is the smallest unit of deployment in OpenShift. It represents a group of containers that share a network namespace and are scheduled together. 5. What is a route in OpenShift, and how does it differ from a service? A route defines how external traffic is routed to services within a cluster. It acts as a virtual host for your applications. A service is a logical group of pods that provide the same functionality. 6. Explain the concept of a deployment configuration in OpenShift. A deployment configuration defines the desired state of an application, including the number of replicas, image, and resource requirements. It also handles rolling updates and scaling. 7. What is the role of a build configuration in OpenShift? A build configuration defines the process for building container images. It can be triggered by source code changes or scheduled events. 8. What is the difference between a stateful application and a stateless application in OpenShift? A stateful application stores data that persists across restarts or failures. Examples include databases and message queues. A stateless application doesn’t require persistent data and can be easily scaled horizontally. 9. How do you manage persistent storage in OpenShift? OpenShift provides options like Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) to manage persistent storage for stateful applications. 10. What is Route in OpenShift Container Platform? You can use a route to host your application at a public URL(Uniform Resource Locators). Depending on the application’s network security setup, it can be secure or insecure. An HTTP(Hypertext Transfer Protocol)-based route is an unsecured route that provides a service on an unsecured application port and employs the fundamental HTTP routing protocol. SET – 3 1. What are Red Hat OpenShift Pipelines? Red Hat OpenShift Pipelines is a cloud-native continuous integration and delivery (CI/CD) system based on Kubernetes. It uses Tekton building components to automate deployments across several platforms, abstracting away the underlying implementation details. 2. Explain how Red Hat OpenShift Pipelines uses triggers. Create a full-featured CI/CD system with Triggers and Pipelines in which Kubernetes resources define the entire CI/CD process. Triggers capture and process external events, such as a Git pull request and extract key pieces of information. 3. What can OpenShift Virtualization do for you? The OpenShift Container Platform add-on OpenShift Virtualization allows you to execute and manage virtual machine workloads alongside container workloads. OpenShift Virtualization uses Kubernetes custom resources to introduce additional objects to your OpenShift Container Platform cluster to enable virtualisation jobs. 4. What is the use of admission plug-ins? Admission plug-ins can be used to control how the OpenShift Container Platform works. After being authenticated, admission plug-ins intercept resource requests submitted to the master API and are permitted to validate resource requests and ensure that scaling laws are obeyed. 5. What are OpenShift cartridges? OpenShift cartridges serve as hubs for application development. Along with a preconfigured environment, each cartridge has its own libraries,