Kubernetes Interview Questions and Answer Part – 5

Which of the following describes the fundamentals of Kubernetes Pod networks?

  • Each Pod gets a unique routable IP on the Pod network (Ans)
  • All Pods share a common IP and are accessed on the Pod network via TCP ports
  • Each container gets a unique routable IP on the Pod network

How do two containers in the same Pod communicate?

  • Via the shared localhost adapter inside the Pod (Ans)
  • Via the Pod overlay network
  • Via a local bridged network inside the Pod

Which of the following commands will lauch a Minikube environment using the xhyve Virtual Machine driver on an Apple Mac?

  • kubectl start minikube –vm-driver=xhyve
  • minikube start –vm-driver=xhyve (Ans)
  • kubeadm start minikube –vm-driver=xhyve

Which infrastructure platforms does Kubernetes run on?

  • Kubernetes only runs on virtual machines and cloud platforms as long as they are running Linux.
  • Kubernetes only runs on bare metal Linux installations.
  • Kubernetes is platform agnostic. All it requires is a Linux host. (Ans)
  • Kubernetes only runs on bare metal servers and virtual machines as long as they are running Linux.

Where does the Kubernetes Operations tool kops store its configuration?

  • And environment variable called KOPS
  • A distributed K/V store running in a system Pod
  • An environment variable called KOPS_STATE_STORE (Ans)

You are planning an update to an existing deployment and want to wait 15 seconds in between each pod update. Which option in the deployment manifest file lets you specify this?

  • rollingUpdateWait: 15
  • maxSurge: 15
  • podUptime: 15
  • minReadySeconds: 15 (Ans)

How do Services know which Pods to load-balance requests to?

  • Label selectors (Ans)
  • A static list held in the Service’s Endpoint object
  • Environment variables
  • DNS

You are working with Kubernetes deployments and want to log updates to the deployment each time to issue an update related command. Which command option does this for you?

  • –log
  • –record (Ans)
  • –history
  • –audit

Which Service type (ServiceType) will create a common cluster-wide port on all nodes?

  • CkusterPort
  • NodePort (Ans)
  • ClusterIP
  • NodeIP

Which of the following describes how to scale-up aspects of an application running on Kubernetes?

  • Add more containers to the Pod that needs scaling
  • Add more memory to the machines hosting the Pods
  • Add more replicas of the Pod that needs scaling (Ans)

Which of the following is true about Kubernetes Pods?

  • High level abstraction object for deploying virtual machines
  • Atomic unit of scheduling that contain exactly one container
  • Atomic unit of scheduling that contain one or more containers (Ans)

Which of the following tells Kubernetes that the object you are deploying is a Pod?

  • The value of the kind flag on the kubectl command line
  • The value of the kind field in the YAML or JSON manifest file (Ans)

What are the two major infrastructure components of a Kubernetes cluster?

  • Managers and Workers
  • Masters and Nodes (Ans)
  • Controllers and Minions
  • Masters and Workers

What objects to Deployments manage?

  • Ingress Lists (IngressList)
  • Replica Sets (ReplicaSet) (Ans)
  • Daemon Sets (DaemonSet)
  • Replication Controllers (ReplicationController)

Which of the following commands deploys a new Deployment using a declarative style?

  • kubectl run my-deployment –image=
  • kubectl create deployment -f (Ans)

Which of the following best describes a Kubernetes Service?

  • They allow you to break you monolithic apps into smaller micro-services
  • They provide a stable and reliable networ endpoint for your application containers
  • They provide a stable and reliable networ endpoint for your application Pods (Ans)

Which of the following Kubernetes commands creates a new service object (the iterative way)?

  • kubectl service
  • kubectl expose (Ans)
  • kubectl create -f
  • kubectl endpoint

You are working with a deployment that has 12 revisions and you are currently at revision 12. You want to rollback to revision 10. Which of the following commands will do this for you

  • kubectl rollout undo deployment –to-revision=10 (Ans)
  • kubectl rollout rewind deployment –to-revision=10
  • kubectl rollout reverse deployment –to-revision=10
Rajesh Kumar
Follow me