Kubernetes Interview Questions and Answers
Kubernetes Interview Questions and Answers
Kubernetes can run on-premises bare metal, OpenStack, public clouds Google, Azure,
AWS, etc.
It helps you to avoid vendor lock issues as it can use any vendor-specific APIs or
services except where Kubernetes provides an abstraction, e.g., load balancer and
storage.
It will enable applications that need to be released and updated without any
downtime.
Kubernetes allows you to assure those containerized apps run where and when you
want and help you to find resources and tools which you want to work.
10) What are the features of Kubernetes?
The features of Kubernetes are:
Automated Scheduling
Self-Healing Capabilities
Automated rollouts & rollback
Horizontal Scaling & Load Balancing
Offers environment consistency for development, testing, and production
Infrastructure is loosely coupled to each component can act as a separate unit
Provides a higher density of resource utilization
Offers enterprise-ready features
Application-centric management
Auto-scalable infrastructure
You can create predictable infrastructure
11) Mention the types of controller managers
Types of controller managers are: 1) endpoints controller, 2) service accounts controller, 3)
node controller, 4) namespace controller, 5) replication controller, 6) token controller.
12) Explain Kubernetes Architecture
Kubernet
es Architecture Diagram
Master Node: The master node is the first and most vital component which is
responsible for the management of Kubernetes cluster. It is the entry point for all
kinds of administrative tasks. There may be more than one master node in the cluster
to check for fault tolerance.
API Server: The API server acts as an entry point for all the REST commands used for
controlling the cluster.
Scheduler: The scheduler schedules the tasks to the slave node. It stores the resource
usage information for every slave node. It is responsible for distributing the workload.
Etcd: etcd components, store configuration detail, and wright values. It
communicates with the most component to receive commands and work. It also
manages network rules and port forwarding activity.
Worker/Slave nodes: Worker nodes are another essential component that contains
all the required services to manage the networking between the containers,
communicate with the master node, which allows you to assign resources to the
scheduled containers.
Kubelet: It gets the configuration of a Pod from the API server and ensures that the
described containers are up and running.
Docker Container: Docker container runs on each of the worker nodes, which runs
the configured pods.
Pods: A pod is a combination of single or multiple containers that logically run
together on nodes.
Heapster
cAdvisor
Prometheus
InfluxDB
Grafana
26) List components of Kubernetes
There are three components of Kubernetes, they are:
Addons
Node components
Master Components
27) Define headless service
Headless service is defined as a service that uses IP address, but instead of load balancing, it
returns of associated pods.
28) What are the important components of node status?
The important component of node status are:
Condition
Capacity
Info
Address
29) What is minikube?
Minikube is a software that helps the user to run Kubernetes. It runs on the single nodes that
are inside VM on your computer. This tool is also used by programmers who are developing
an application using Kubernetes.
30) Mention the uses of GKE
The uses of the GKE (Google Kubernetes Engine) are:
It enables to runs storage platforms like ceph and glusterd on each node.
Daemon sets run the logs collection on every node such as filebeat or fluentd.
It performs node monitoring on each and every node.
37) Explain Replica set
A Replica set is used to keep replica pods stable. It enables us to specify the available number
of identical pods. This can be considered a replacement for the replication .controller.
38) List out some important Kubectl commands:
The important Kubectl commands are:
kubectl annotate
kubectl cluster-info
kubectl attach
kubectl apply
kubectl config
kubectl autoscale
kubectl config current-context
kubectl config set.
39) Why uses Kube-apiserver?
Kube-apiserver is an API server of Kubernetes that is used to configure and validate API
objects, which include services, controllers, etc. It provides the frontend to the cluster’s
shared region using which components interact with each other.
40) Explain the types of Kubernetes pods
There are two types of pods in Kubernetes:
Using correct auth mode with API server authentication mode= Node.
Make kubeless that protects its API via authorization-mode=Webhook.
Ensure the kube-dashboard uses a restrictive RBAC (Role-Based Access Control) policy
51) What is ContainerCreating pod?
A ContainerCreating pod is one that can be scheduled on a node but can’t start up properly.
52) What are the types of Kubernetes Volume?
The types of Kubernetes Volume are:
EmptyDir
GCE persistent disk
Flocker
HostPath
NFS
ISCSI
rbd
PersistentVolumeClaim
downwardAPI
53) Explain PVC
The full form of PVC stands for Persistent Volume Claim. It is storage requested by Kubernetes
for pods. The user does not require to know the underlying provisioning. This claim should be
created in the same namespace where the pod is created.
54) What is the Kubernetes Network Policy?
Network Policy defines how the pods in the same namespace would communicate with each
other and the network endpoint.
55) What is Kubernetes proxy service?
Kubernetes proxy service is a service which runs on the node and helps in making it available
to an external host.