Kubernetes interview questions and answers

What you will learn here about kubernetes

  • Kubernetes interview questions and answers

Kubernetes interview questions and answers

Following are the most common interview questions asked in the interview

1)Which ingress is used to route traffic from single IP to multiple services?

  1. Single ingress
  2. fanout ingress
  3. headless service
  4. None of the options

2)This Command is used to deploy nginx to namespace testns

  1. kubectl run nginx ns=testns
  2. kubectl deploy nginx ns=testns
  3. kubectl run nginx – -image=nginx -namespace=testns
  4. None of the options

3)This is not a valid Container Lifecyle hook.

  1. PostStart
  2. PreStop
  3. PreStart
  4. None of the options

4)To expose a Pod to outside world we use _ _ _ _ _

  1. node Ip
  2. Cluster Port
  3. Node Port
  4. Claster IP

5)Services help to access nodes

  1. False
  2. True

6)This is not a valid imagePullPolicy.

  1. IfNotPresent
  2. Never
  3. Always
  4. Anytime

7)How many containers a Pod can run?

  1. any number
  2. 1
  3. 2
  4. 3

8)Ingress helps to utilize a single cloud load balancer for multiple services.

  1. True
  2. False

9)A Deployment is considered to be failed because of

  1. Error with image pull
  2. Readliness probe failures
  3. Insufficient quota
  4. All the options

10)Deployments internally use _ _ _ _ _ for Replication management

  1. Replication Controller
  2. Pods
  3. Daemonset
  4. ReplicaSets

11)Node Level logging can be achieved using this controller.

  1. DaemonSet
  2. Deployments
  3. ReplicaSets
  4. StatefulSets

12)This is know as next generation Replication Controller

  1. Deployment
  2. DaemonSet
  3. ReplicaSet
  4. Pods

13)Which field in Pod Definition is used to pass environmental variables?

  1. environ
  2. env
  3. args
  4. environment

14)Node in kubernetes is a

  1. Virtual machine
  2. Physical machine
  3. both physical and virtual machine
  4. None of the options

15)This command is used Scale deployment nginx to 10 pods

  1. kubectl scale nginx -replicas=10
  2. kubectl nginx scale=10
  3. kubectl scale deployment/nginx -replicas=10
  4. None of the options

16)It is recommended to use :latest tag with your deployment images.

  1. True
  2. False

17)This command is used to list ingress

  1. kubectl get pod -type=ingress
  2. kubectl get ingr
  3. kubectl get ing
  4. None of the options

18)We can use this controllers to run specific number of pods at all the time.

  1. daemonSets
  2. service
  3. namespaces
  4. Replication Controller

19)Controller manage pods.

  1. True
  2. False

20)This is an example to imperative commands.

  1. kubectl create -f nginx-depl.yaml
  2. kubectl apply -f some-depl.yaml
  3. kubectl run nginx –image nginx
  4. kubectl delete -f some-depl.yaml

You may also like...