Top OpenShift Interview Questions (2023) | CodeUsingJava
















Most frequently asked OpenShift Interview Questions


OpenShift Interview Questions
  1. What is OpenShift?
  2. Explain Openshift Architecture?
  3. List some Openshift Kubernetes components?
  4. How to manage Openshift security?
  5. Explain Autoscaling in Openshift?
  6. What is Cloud Computing?
  7. What are different types of Cloud?
  8. Compare Docker and OpenShift?
  9. Explain Openshift architecture?Can we have two accounts on OpenShift platform?
  10. Can I use the existing bitbucket git repo with OpenShift?
  11. What is Containerization?
  12. What is OpenShift deployment?
  13. What Is OpenShift Online?
  14. What are pods in OpenShift?
  15. What is rolling strategy in OpenShift?
  16. Explain container Orchestration in Kubernetes?
  17. What are gears in OpenShift?


What is OpenShift?

OpenShift is RedHat's cloud development Platform as a Service (PaaS). OpenShift is a family of containerization software developed by Red Hat. Its flagship product is the OpenShift Container Platform on-premises platform as a service built around Docker containers orchestrated and managed by Kubernetes on a foundation of Red Hat Enterprise Linux.
The free and open source cloud-based platform allows developers to create, test and run their applications and deploy them to the cloud.
OpenShift provides support for Node.js, Ruby, Python, PHP, Perl, and Java and is extensible so that users can add support for other languages. Resources allocated for applications can be automatically or manually scaled so that as demand increases there is no degradation of performance. OpenShift provides portability through the DeltaCloud API so customers can migrate deployments to other cloud computing vendor environments.

Explain Openshift Architecture?


Openshift Architecture
Openshift is a layered approach. All the layers are bound tightly to each other using Kubernetes and Docker cluster. The architecture supports and manages docker containers which are hosted on top of all layers using kuberntes. OpenShift V3 supports containerized infrastructure. The main difference between OpenShift and vanilla Kubernetes is the concept of build-related artifacts. In OpenShift, such artifacts are considered first class Kubernetes resources upon which standard Kubernetes operations can apply.

List some Openshift Kubernetes components?

The Openshift Kubernetes components are as follows -
  • Etcd
  • API Server
  • Controller Manager
  • Scheduler

How to manage Openshift security?

Openshift Security is a combination of 2 components -
Openshift Security interview questions
  • Security Context Constraints (SCC) - It is basically used for pod restriction, which means it defines the limitations for a pod, as in what actions it can perform and what all things it can access in the cluster.
  • Service Account - Service accounts are basically used to control access to OpenShift master API, which gets called when a command or a request is fired from any of the master or node machine.

Explain Autoscaling in Openshift?

Autoscaling is a feature in OpenShift where the applications deployed can increase i.e scale or decrease i.e sink as required
Openshift Autoscaling interview questions
Scaling is of two types -
  • Vertical scaling - Vertical scaling means adding more and more power to a single machine by adding more CPU and hard disk. This is now depricated and not supported
  • Horizontal scaling - This type of scaling is used when there is a need of handling more request by increasing the number of machines. This can be done it 2 ways
    • Deployment configuration file - In the deployment configuration file we specify the minimum and maximum number of replicas which can be used at any given time
      apiVersion: extensions/v1beta1
      kind: HorizontalPodAutoscaler
      metadata:
         name: database
      spec:
         scaleRef:
            kind: DeploymentConfig
            name: database
            apiVersion: v1
            subresource: scale
         minReplicas: 1
         maxReplicas: 12
         cpuUtilization:
            targetPercentage: 80
      
    • Running the autoscale command - autoscale command in oc command line.
      $ oc autoscale dc/database --min 1 --max 6 --cpu-percent = 75
      deploymentconfig "database" autoscaled
      

Compare Docker and OpenShift?

Both Docker and OpenShift implement a PaaS service.
The primary difference is that Docker as a project is focused on the runtime container only, whereas OpenShift (as a system) includes both the runtime container as well as the REST API, coordination, and web interfaces to deploy and manage individual containers.
OpenShift is more of an abstraction layer on container orchestration . OpenShift internally uses Kubernetes for container orchestration. Docker has docker swarm for container orchestration

Explain Openshift architecture

Can we have two accounts on OpenShift platform?

Use rhc setup -l logindetails
Here logindetails is your registered OpenShift's email address.

Can I use the existing bitbucket git repo with OpenShift?

We can use the existing bitbucket git repo with OpenShift using asset pipeline as follows -
hc create-app $APPNAME ruby-1.9 --from-code $BICTBUCKET_GIT_LOCATION


What Is OpenShift Online?

OpenShift Online is Red Hat's public cloud application deployment and hosting platform. Get on-demand access to OpenShift to build, deploy and manage scalable containerized applications, operated and supported by Red Hat.

What are pods in OpenShift?

OpenShift Online leverages the Kubernetes concept of a pod, which is one or more containers deployed together on one host, and the smallest compute unit that can be defined, deployed, and managed. Pods are the rough equivalent of a machine instance (physical or virtual) to a container.

What is rolling strategy in OpenShift?

Rolling Strategy. A rolling deployment slowly replaces instances of the previous version of an application with instances of the new version of the application. A rolling deployment typically waits for new pods to become ready via a readiness check before scaling down the old components.

What are gears in OpenShift?

Gears were a core component of OpenShift v2. Technologies such as kernel namespaces, cGroups, and SELinux helped deliver a highly-scalable, secure, containerized application platform to OpenShift users. Gears themselves were a form of container technology.
OpenShift v3 takes the gears idea to the next level. It uses Docker as the next evolution of the v2 container technology. This container architecture is at the core of OpenShift v3.

What is OpenShift deployment?

A deployment in OpenShift is a replication controller based on a user defined template called a deployment configuration. Deployments are created manually or in response to triggered events. The deployment system provides:
  • A deployment configuration, which is a template for deployments.
  • Triggers that drive automated deployments in response to events.
  • User-customizable strategies to transition from the previous deployment to the new deployment.
  • Rollbacks to a previous deployment.
  • Manual replication scaling.