Q1. Define kubelet
The kubelet is a service agent which controls and maintains a group of pods by checking pod specifications using Kubernetes. The kubelet runs on each node and allows communication between a master node and a slave node.
Q2 What are the disadvantages of Kubernetes?
Kubernetes dashboard is not as helpful as it should be
Security is not very effective.
It is very complex and can reduce productivity
Kubernetes is more costly than its alternatives.
Q3. What is Kube-proxy?
Kube-proxy is an implementation of both a network proxy and a load balancer. It is used to support service abstraction used with other networking operations. It is responsible for directing traffic to the container depending on IP and the port number.
Q4. What is the role of Load Balance in Kubernetes?
Load balancing is a way to distribute the incoming traffic into multiple backend servers, which is useful to ensure the application available to the users.
In Kubernetes, as shown in the above figure all the incoming traffic lands at a single IP address on the load balancer which is a way to expose your service to outside the internet and route the incoming traffic to a particular pod (via service) using an algorithm known as round-robin. Even if any pod goes down load balances are notified so that the traffic is not routed to that particular unavailable node. Thus load balancers in Kubernetes are responsible for distributing a set of tasks (incoming traffic) to the pods.
Q5. How to monitor the Kubernetes cluster?
Prometheus is used for Kubernetes monitoring. The Prometheus ecosystem consists of multiple components.
1. Mainly Prometheus server which scrapes and stores time-series data.
2. Client libraries for instrumenting application code.
3. Push gateway for supporting short-lived jobs.
4. Special-purpose exporters for services like StatsD, HAProxy, Graphite, etc.
5. An alert manager to handle alerts on various support tools
Q6. How to get the central logs from POD?
This architecture depends upon the application and many other factors. Following are the common logging patterns.
Node-level logging agent.
Streaming sidecar container.
Sidecar container with the logging agent.
Export logs directly from the application.
In the setup, journal beat and file beat are running as daemon sets. Logs collected by these are dumped to the Kafka topic which is eventually dumped to the ELK stack.
Q7. What is the difference between Kubernetes and Docker Swarm?
The difference between Kubernetes and Docker Swarm is:
Kubernetes | Docker Swarm |
---|---|
Kubernetes provides an auto-scaling feature. | Docker Swarm does not provide an auto-scaling feature. |
Manually configure your load balancing settings. | Does auto load balancing |
Installation is complicated & time-consuming. | Installation is easy & fast. |
GUI is available. | GUI is not available. |
It provides a built-in load-balancing technique. | Process scheduling is done to maintain services while updating. |
Q8. Define Ingress Network
Ingress network is defined as a collection of rules which allow permission for connections into the Kubernetes cluster.
Q9. How to configure TLS with Ingress?
Add tls and secretName entries.
spec:
tls:
- hosts:
- exampleapp.com
secretName: exampleapp-secret-tls
Q10. What is Kubectl?
Kubectl is the platform using which you can pass commands to the cluster. So, it basically provides the CLI to run commands against the Kubernetes cluster with various ways to create and manage the Kubernetes component.
Q11. What is Google Container Engine?
Google Container Engine (GKE) is an open-source management platform for Docker containers and clusters. This Kubernetes-based engine supports only those clusters which run within Google’s public cloud services.
Q12. Why load balancer is needed?
A load balancer is needed because it gives a standard way to distribute network traffic among different services, which run in the backend.
Q13. How to run Kubernetes locally?
Kubernetes can be run locally using the Minikube tool. It runs a single-node cluster in a VM (virtual machine) on the computer. Therefore, it offers the ideal way for users who have just started learning Kubernetes.
Q14. What are the tools that are used for container monitoring?
Tools that are used for container monitoring are:
Heapster
cAdvisor
Prometheus
InfluxDB
Grafana
Q15. List components of Kubernetes
There are three components of Kubernetes, they are:
Addons
Node components
Master Components
Q16 Define headless service
Headless service is defined as a service that uses an IP address, but instead of load balancing, it returns associated pods.
Q17. What are the important components of node status?
The important component of node status are:
Condition
Capacity
Info
Address
Q18 What is minikube?
Minikube is a tool that makes it easy to run Kubernetes locally. This runs a single-node Kubernetes cluster inside a virtual machine.
Q19. Mention the uses of GKE
The uses of the GKE (Google Kubernetes Engine) are:
It can be used to create docker container clusters
Resize application controllers
Update and then upgrade the clusters of container
Debug cluster of the container.
GKE can be used to create a replication controller, jobs, services, container pods, or load balancers.
Q20. Define orchestration in Kubernetes
Orchestration in Kubernetes defines as an automatic method of scheduling the work of every container. It is used for applications that are based on microservices within clusters.
Q21. Explain Prometheus in Kubernetes
Prometheus is an application that is used for monitoring and alerting. It can be called out to your systems, grab real-time metrics, compress them, and store them properly in a database.
Q22. List tools for container orchestration
The tools for container orchestration are
1) Docker swarm
2) Apache Mesos
3) Kubernetes.
Q23. Mention the list of objects of Kubernetes?
Objects that are used in Kubernetes are:
1) Pods
2) Replication sets and controllers
3) Jobs and cron jobs
4) Daemon sets
5) Distinctive identities
6) Deployments
7) Stateful sets.
Q24. Define Stateful sets in Kubernetes
The stateful set is a workload API object that is used to manage the stateful application. It can also be used to manage the deployments and scale the sets of pods. The state information and other data of stateful pods are stored in the disk storage, which connects with the stateful set.
Q25. Why use Daemon sets?
Daemon sets are used because:
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.
Q26. 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.
Q27. 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.
Q28. 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 front end to the cluster’s shared region using which components interact with each other.
Q29. Explain the types of Kubernetes pods
There are two types of pods in Kubernetes:
Single Container Pod: It can be created with the run command.
Multicontainer pods: These can be created using the “create” command in Kubernetes.
Q30. What are the labels in Kubernetes?
Labels are a collection of keys that contain some values. The key values are connected to pods, replication controllers, and associated services. Generally, labels are added to some object during its creation time. They can be modified by the users at run time.
Q31. Define OpenShift
OpenShift is a public cloud application development and hosting platform developed by Red Hat. It offers automation for management so that developers can focus on writing the code.
Q32. What are federated clusters?
Federated clusters multiple clusters that are managed as a single cluster.
Q33. Mention the difference between Docker volumes and Kubernetes Volumes
Kubernetes Volumes:
1. Volumes are not limited to any container.
2. Kubernetes volumes support all containers deployed in a pod of Kubernetes.
Docker Volumes:
1. Volumes are limited to a pod in the container.
2. Docker volumes do not support all containers deployed in Docker.
Q34. What are the ways to provide API-Security on Kubernetes?
The ways to provide API-Security on Kubernetes are:
Using correct auth mode with API server authentication mode= Node.
Make kube less that protects its API via authorization-mode=Webhook. Ensure the kube-dashboard uses a restrictive RBAC (Role-Based Access Control) policy.
Q35. What is ContainerCreating pod?
A ContainerCreating pod is one that can be scheduled on a node but can’t start up properly.
Exception Handling Interview Questions
DBMS Interview Questions Set -1
DBMS Interview Questions Set -2
JPA Interview Questions Set -1
Spring Boot Interview Questions Set 1
Spring Boot Interview Questions Set 2
Core Java Interview Questions Set -1
Docker interview question Set -1
Docker interview question Set -2
Kubernetes Interview Question Set -1
Kubernetes Interview Question Set -2
No comments:
Post a Comment