Skip to main content

OpenShift Interview Questions and Answers 2025

 

OpenShift Interview Questions and Answers 


1-What is OpenStack?

OpenStack is a cloud computing project aimed at providing infrastructure as a service (IaaS). OpenStack is a set of software components for managing and building Cloud Computing platforms for private and public clouds. OpenStack is an Open Source Cloud Computing platform.

2-Define OpenStack key components?

the key components of OpenStack
Nova – It handles the Virtual machines at compute level and performs other computing tasks at compute or hypervisor level.
Neutron – It provides the networking functionality to VMs, Compute, and Controller Nodes.
Keystone – It provides the identity service for all cloud users and OpenStack services. In other words, we can say Keystone a method to provide access to cloud users and services.
Horizon – It provides a GUI (Graphical User Interface), using the GUI Admin can all day to day operations task at ease.
Cinder – It provides the block storage functionality Generally, OpenStack Cinder is integrated with Ceph and ScaleIO to service block storage to Compute & Controller nodes.
Swift – It provides object storage functionality. Generally, Glance images are on object storage. External storage like ScaleIO can work as Object storage too and can easily be integrated with Glance Service.
Glance – It provides Cloud image services, using glance admin used to upload and download cloud images.
Heat – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out
Ceilometer – It provides telemetry and billing services.

3-What are services generally run on a controller node?

Following services run on a controller node:
Identity Service ( KeyStone)
Image Service ( Glance)
Nova Services like Nova API, Nova Scheduler & Nova DB
Block & Object Service
Ceilometer Service
MariaDB / MySQL and RabbitMQ Service
Management services of Networking (Neutron) and Networking agents
Orchestration Service (Heat)

4-What are the services generally run on a Compute Node?

Following services run on a compute node,
Nova-Compute
Networking Services like OVS
Hypervisor like KVM

5-Tell me the command how to spin a VM from Command Line?

We can easily spin a new VM using the following OpenStack command,
# openstack server create --flavor {flavor-name} --image {Image-Name-Or-Image-ID}  --nic net-id={Network-ID} --security-group {Security_Group_ID} –key-name {Keypair-Name} <VM_Name>

6-How to list the network namespace of a tenant in OpenStack?

The network namespace of a tenant can be listed using “ip net ns” command
# ip netns list 

 7-How to execute a command inside the network namespace in OpenStack?

# ip netns exec {network-space} <command>

8-How to upload and download a cloud image in Glance from the command line?

A Cloud image can be uploaded in a glance from command using OpenStack command,

~# openstack image create --disk-format qcow2 --container-format bare   --public --file {Name-Cloud-Image}.qcow2     <Cloud-Image-Name>

Use below OpenStack command to download a cloud image from the command line,

~# glance image-download --file <Cloud-Image-Name> --progress  <Image-ID>

9- How to reset the error state of a VM into active in OpenStack env?

There are some scenarios where some VMs went to an error state and this error state can be changed into an active state using the below commands,

~# nova reset-state --active {Instance_id}

 10-How to get a list of available Floating IPs from the command line?

Available floating IPs can be listed using the below command,
~]# openstack ip floating list | grep None

11-How to get a list of VMs which are provisioned on a specific Compute node?

#openstack server list –all-projects –long -c Name -c Host | grep -i  {Compute-Node-Name}

12- How to view the console log of an OpenStack instance from the command line?

Console logs of an instance can be viewed from the command line using the following commands,

First, get the ID of an instance and then use the below command,

~# openstack console log show {Instance-id}

 13-How to get the console URL of an OpenStack instance?

Console URL of an instance can be retrieved from the command line using the below OpenStack command,

~# openstack console url show {Instance-id}

OpenShift Interview Questions and Answers

1. How do you display or show the current IP ranges for services and pods in your OCP cluster?

oc get networks.operator.openshift.io cluster -o jsonpath='{.spec.clusterNetwork[*].cidr}'
oc get networks.operator.openshift.io cluster -o jsonpath='{.spec.serviceNetwork[*]}'

2. How do you configure Egress and Namespace Egress for OpenShift?

Assign the label to nodes and create an EgressIP object:

oc label node <node-name> egress-assignable=

apiVersion: k8s.ovn.org/v1
kind: EgressIP
metadata:
  name: example-egressip
spec:
  egressIPs:
    - 192.168.1.100
  namespaceSelector:
    matchLabels:
      app: mynamespace
  podSelector: {}

3. How do you check which version of your OpenShift cluster?

oc version
oc get clusterversion

4. What kind of authentication method is used for authenticating OpenShift?

OpenShift supports OAuth-based authentication, LDAP, and OpenID Connect. Check the configuration:

oc get oauth cluster -o yaml

5. How do you troubleshoot the connectivity from POD to POD?

oc rsh <pod-name> ping <destination-pod-IP>
oc get networkpolicy -A
oc debug node/<node-name> -- chroot /host

6. How do you configure routes to run on a specific set of nodes, for example, infra nodes?

oc label node <node-name> node-role.kubernetes.io/infra=

oc patch ingresscontroller default -n openshift-ingress-operator --type merge -p '
{
  "spec": {
    "nodePlacement": {
      "nodeSelector": {
        "matchLabels": {
          "node-role.kubernetes.io/infra": ""
        }
      }
    }
  }
}'

7. How do you make sure that you have a dedicated node for the infrastructure components?

oc label node <infra-node> node-role.kubernetes.io/infra=
oc adm taint nodes <infra-node> node-role.kubernetes.io/infra:NoSchedule

8. What is the best monitoring tool to be used for OpenShift monitoring?

Prometheus and Grafana are the best tools for monitoring OpenShift.

9. How do you configure an alert in Prometheus?

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: custom-alerts
  namespace: openshift-monitoring
spec:
  groups:
    - name: custom-rules
      rules:
        - alert: HighMemoryUsage
          expr: node_memory_Active_bytes > 80
          for: 5m
          labels:
            severity: critical
          annotations:
            summary: "High Memory Usage"

oc apply -f custom-alert.yaml

10. What are the best logging tools for OpenShift?

Fluentd, Elasticsearch, Kibana, and Loki are popular logging tools for OpenShift.

11. How does the logging stack work in OpenShift?

OpenShift uses Fluentd for log collection, Elasticsearch for storage, Kibana for visualization, and Curator for log management.

12. How is the OpenShift upgrade done?

oc get clusterversion
oc adm upgrade --to-latest
watch oc get clusterversion

13. What are the diagnostic tools for collecting logs and uploading them for support?

oc adm must-gather
oc logs -n openshift-logging
oc get events -A
oc adm inspect clusteroperators --dest-dir=<path>

1. How do you display or show the current IP ranges for services and pods in your OCP cluster?

oc get networks.operator.openshift.io cluster -o jsonpath='{.spec.clusterNetwork[*].cidr}'
oc get networks.operator.openshift.io cluster -o jsonpath='{.spec.serviceNetwork[*]}'

2. How do you configure Egress and Namespace Egress for OpenShift?

Assign the label to nodes and create an EgressIP object:

oc label node <node-name> egress-assignable=

apiVersion: k8s.ovn.org/v1
kind: EgressIP
metadata:
  name: example-egressip
spec:
  egressIPs:
    - 192.168.1.100
  namespaceSelector:
    matchLabels:
      app: mynamespace
  podSelector: {}

3. How do you check which version of your OpenShift cluster?

oc version
oc get clusterversion

4. What kind of authentication method is used for authenticating OpenShift?

OpenShift supports OAuth-based authentication, LDAP, and OpenID Connect. Check the configuration:

oc get oauth cluster -o yaml

5. How do you troubleshoot the connectivity from POD to POD?

oc rsh <pod-name> ping <destination-pod-IP>
oc get networkpolicy -A
oc debug node/<node-name> -- chroot /host

6. How do you configure routes to run on a specific set of nodes, for example, infra nodes?

oc label node <node-name> node-role.kubernetes.io/infra=

oc patch ingresscontroller default -n openshift-ingress-operator --type merge -p '
{
  "spec": {
    "nodePlacement": {
      "nodeSelector": {
        "matchLabels": {
          "node-role.kubernetes.io/infra": ""
        }
      }
    }
  }
}'

7. How do you make sure that you have a dedicated node for the infrastructure components?

oc label node <infra-node> node-role.kubernetes.io/infra=
oc adm taint nodes <infra-node> node-role.kubernetes.io/infra:NoSchedule

8. What is the best monitoring tool to be used for OpenShift monitoring?

Prometheus and Grafana are the best tools for monitoring OpenShift.

9. How do you configure an alert in Prometheus?

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: custom-alerts
  namespace: openshift-monitoring
spec:
  groups:
    - name: custom-rules
      rules:
        - alert: HighMemoryUsage
          expr: node_memory_Active_bytes > 80
          for: 5m
          labels:
            severity: critical
          annotations:
            summary: "High Memory Usage"

oc apply -f custom-alert.yaml

10. What are the best logging tools for OpenShift?

Fluentd, Elasticsearch, Kibana, and Loki are popular logging tools for OpenShift.

11. How does the logging stack work in OpenShift?

OpenShift uses Fluentd for log collection, Elasticsearch for storage, Kibana for visualization, and Curator for log management.

12. How is the OpenShift upgrade done?

oc get clusterversion
oc adm upgrade --to-latest
watch oc get clusterversion

13. What are the diagnostic tools for collecting logs and uploading them for support?

oc adm must-gather
oc logs -n openshift-logging
oc get events -A
oc adm inspect clusteroperators --dest-dir=<path>

Comments

Popular posts from this blog

Quick Guide to VCF Automation for VCD Administrators

  Quick Guide to VCF Automation for VCD Administrators VMware Cloud Foundation 9 (VCF 9) has been  released  and with it comes brand new Cloud Management Platform –  VCF Automation (VCFA)  which supercedes both Aria Automation and VMware Cloud Director (VCD). This blog post is intended for those people that know VCD quite well and want to understand how is VCFA similar or different to help them quickly orient in the new direction. It should be emphasized that VCFA is a new solution and not just rebranding of an old one. However it reuses a lot of components from its predecessors. The provider part of VCFA called Tenenat Manager is based on VCD code and the UI and APIs will be familiar to VCD admins, while the tenant part inherist a lot from Aria Automation and especially for VCD end-users will look brand new. Deployment and Architecture VCFA is generaly deployed from VCF Operations Fleet Management (former Aria Suite LCM embeded in VCF Ops. Fleet Management...
  Issue with Aria Automation Custom form Multi Value Picker and Data Grid https://knowledge.broadcom.com/external/article?articleNumber=345960 Products VMware Aria Suite Issue/Introduction Symptoms: Getting  error " Expected Type String but was Object ", w hen trying to use Complex Types in MultiValue Picker on the Aria for Automation Custom Form. Environment VMware vRealize Automation 8.x Cause This issue has been identified where the problem appears when a single column Multi Value Picker or Data Grid is used. Resolution This is a known issue. There is a workaround.  Workaround: As a workaround, try adding one empty column in the Multivalue picker without filling the options. So we can add one more column without filling the value which will be hidden(there is a button in the designer page that will hide the column). This way the end user will receive the same view.  

Step-by-Step Explanation of Ballooning, Compression & Swapping in VMware

 🔹 Step-by-Step Explanation of Ballooning, Compression & Swapping in VMware ⸻ 1️⃣ Memory Ballooning (vmmemctl) Ballooning is the first memory reclamation technique used when ESXi detects memory pressure. ➤ Step-by-Step: How Ballooning Works  1. VMware Tools installs the balloon driver (vmmemctl) inside the guest OS.  2. ESXi detects low free memory on the host.  3. ESXi inflates the balloon in selected VMs.  4. Balloon driver occupies guest memory, making the OS think RAM is full.  5. Guest OS frees idle / unused pages (because it believes memory is needed).  6. ESXi reclaims those freed pages and makes them available to other VMs. Why Ballooning Happens?  • Host free memory is very low.  • ESXi wants the VM to release unused pages before resorting to swapping. Example  • Host memory: 64 GB  • VMs used: 62 GB  • Free: 2 GB → ESXi triggers ballooning  • VM1 (8 GB RAM): Balloon inflates to 2 GB → OS frees 2 GB → ESXi re...