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?
- Single ingress
- fanout ingress
- headless service
- None of the options
2)This Command is used to deploy nginx to namespace testns
- kubectl run nginx ns=testns
- kubectl deploy nginx ns=testns
- kubectl run nginx – -image=nginx -namespace=testns
- None of the options
3)This is not a valid Container Lifecyle hook.
- PostStart
- PreStop
- PreStart
- None of the options
4)To expose a Pod to outside world we use _ _ _ _ _
- node Ip
- Cluster Port
- Node Port
- Claster IP
5)Services help to access nodes
- False
- True
6)This is not a valid imagePullPolicy.
- IfNotPresent
- Never
- Always
- Anytime
7)How many containers a Pod can run?
- any number
- 1
- 2
- 3
8)Ingress helps to utilize a single cloud load balancer for multiple services.
- True
- False
9)A Deployment is considered to be failed because of
- Error with image pull
- Readliness probe failures
- Insufficient quota
- All the options
10)Deployments internally use _ _ _ _ _ for Replication management
- Replication Controller
- Pods
- Daemonset
- ReplicaSets
11)Node Level logging can be achieved using this controller.
- DaemonSet
- Deployments
- ReplicaSets
- StatefulSets
12)This is know as next generation Replication Controller
- Deployment
- DaemonSet
- ReplicaSet
- Pods
13)Which field in Pod Definition is used to pass environmental variables?
- environ
- env
- args
- environment
14)Node in kubernetes is a
- Virtual machine
- Physical machine
- both physical and virtual machine
- None of the options
15)This command is used Scale deployment nginx to 10 pods
- kubectl scale nginx -replicas=10
- kubectl nginx scale=10
- kubectl scale deployment/nginx -replicas=10
- None of the options
16)It is recommended to use :latest tag with your deployment images.
- True
- False
17)This command is used to list ingress
- kubectl get pod -type=ingress
- kubectl get ingr
- kubectl get ing
- None of the options
18)We can use this controllers to run specific number of pods at all the time.
- daemonSets
- service
- namespaces
- Replication Controller
19)Controller manage pods.
- True
- False
20)This is an example to imperative commands.
- kubectl create -f nginx-depl.yaml
- kubectl apply -f some-depl.yaml
- kubectl run nginx –image nginx
- kubectl delete -f some-depl.yaml