50 Kubernetes Questions- Must to know

Here are 50 Kubernetes questions ranging from basic to advanced, along with their answers:

IN TODAY'S EDIT

Use Case

50 Kubernetes Questions- Must to know

🚀 Top News

Siri's Silent Listen: Apple's $95 million privacy settlement and what it means for you

📚️ Resources :

Learn New Thing: Tutorial for Selenium automation testing tool lovers.

Want to prepare for Interviews & Certifications

Before we begin... a big thank you to Friend Support.

Inviul

Inviul is the multi niche learning platform. It covers various topics like Selenium, Appium,Cucumber, Java and many more.

USE CASE

50 Kubernetes Questions- Must to know

1. What is Kubernetes?
Kubernetes is an open-source container orchestration platform that automates deployment, scaling, and management of containerized applications.

2. What are the key components of Kubernetes architecture?
The main components are:

  • Master Node: API Server, Controller Manager, Scheduler, etcd.

  • Worker Node: Kubelet, Kube Proxy, Container Runtime.

3. What is a Pod in Kubernetes?
A Pod is the smallest deployable unit in Kubernetes, consisting of one or more containers that share storage and network.

4. What is a Deployment in Kubernetes?
A Deployment manages the creation, scaling, and updating of Pods.

5. What is a Service in Kubernetes?
A Service exposes a set of Pods to the network and enables load balancing.

6. What are Namespaces in Kubernetes?
Namespaces provide logical separation within a cluster to isolate resources.

7. What is etcd in Kubernetes?
Etcd is a distributed key-value store that Kubernetes uses to store cluster configuration data.

8. What is a ReplicaSet?
A ReplicaSet ensures that a specified number of Pod replicas are running at any given time.

9. How do you scale a Deployment in Kubernetes?
kubectl scale deployment <deployment-name> --replicas=5

10. How to check running Pods in Kubernetes?
kubectl get pods

Intermediate Kubernetes Questions

11. What is a ConfigMap in Kubernetes?
ConfigMap allows decoupling configuration details from application code.

12. What is a Secret in Kubernetes?
A Secret stores sensitive information, such as passwords, securely.

13. What is the difference between a StatefulSet and a Deployment?
StatefulSet is used for stateful applications, ensuring unique network identities and persistent storage.

14. How does Kubernetes handle networking?
Kubernetes uses CNI (Container Network Interface) plugins to manage networking, such as Flannel, Calico, and Weave.

15. What is the role of the Kubelet?
Kubelet runs on worker nodes and ensures containers are running in a Pod.

16. What is the function of the Kubernetes Scheduler?
It assigns newly created Pods to available worker nodes based on resource availability and constraints.

17. How do you perform a rolling update in Kubernetes?
kubectl rollout restart deployment <deployment-name>

18. How do you rollback a Deployment in Kubernetes?
kubectl rollout undo deployment <deployment-name>

19. What is a DaemonSet in Kubernetes?
A DaemonSet ensures that a Pod runs on all (or selected) worker nodes.

20. What is Horizontal Pod Autoscaler (HPA)?
HPA automatically scales the number of Pods based on CPU/memory usage.

Advanced Kubernetes Questions

21. What is a Persistent Volume (PV)?
A Persistent Volume is a storage resource provisioned in the cluster to provide persistent storage to Pods.

22. What is a Persistent Volume Claim (PVC)?
A PVC is a request for storage by a user, which binds to a PV.

23. How does Kubernetes handle high availability?
By using multiple master nodes, distributed etcd storage, and load balancers.

24. What is the difference between Ingress and LoadBalancer services?
Ingress manages external access to services, while LoadBalancer provisions an external load balancer.

25. What is a Network Policy in Kubernetes?
A Network Policy controls communication between Pods based on rules.

26. How do you monitor Kubernetes clusters?
Using tools like Prometheus, Grafana, and ELK stack.

27. What is Helm in Kubernetes?
Helm is a package manager for Kubernetes that simplifies application deployment.

28. How do you debug failing Pods?
Using kubectl describe pod <pod-name> and kubectl logs <pod-name>

29. What are the types of Kubernetes probes?
Liveness, Readiness, and Startup probes.

30. What is the role of RBAC in Kubernetes?
Role-Based Access Control (RBAC) restricts access based on user roles.

31. What is the difference between a ClusterIP, NodePort, and LoadBalancer service?
ClusterIP exposes services internally, NodePort externally via a port, and LoadBalancer creates an external load balancer.

32. How does Kubernetes implement service discovery?
Through internal DNS and environment variables.

33. What is the purpose of Taints and Tolerations?
They prevent Pods from being scheduled on inappropriate nodes unless tolerated.

34. How can you drain a node in Kubernetes?
kubectl drain <node-name>

35. How does Kubernetes handle Secrets encryption?
By enabling EncryptionConfig to encrypt data at rest.

36. What is Pod Disruption Budget (PDB)?
A PDB limits the number of Pods that can be disrupted during maintenance.

37. How do you troubleshoot CrashLoopBackOff errors?
Check logs, describe Pods, and validate resource limits.

38. What are Custom Resource Definitions (CRDs)?
CRDs allow users to define their own Kubernetes resource types.

39. What is Kubernetes Federation?
It allows managing multiple clusters from a single control plane.

40. How do you secure a Kubernetes cluster?
By enabling RBAC, using network policies, and restricting access.

41. What is KubeProxy's role in Kubernetes networking?
KubeProxy maintains network rules and routes traffic.

42. How do you perform blue-green deployments in Kubernetes?
By deploying a new version alongside the old one and switching traffic gradually.

43. What is Kubernetes Operator?
An Operator automates the management of complex applications.

44. How does Kubernetes handle node failures?
By detecting unresponsive nodes and rescheduling Pods on healthy nodes.

45. What are Init Containers in Kubernetes?
Init Containers run before regular containers to perform initialization tasks.

46. What is Kubernetes Audit Logging?
It records API requests and responses for security and troubleshooting.

47. What is a Service Mesh in Kubernetes?
A service mesh manages microservices networking with features like observability and security.

48. How do you run stateful applications in Kubernetes?
Using StatefulSets with persistent storage.

49. What are Admission Controllers in Kubernetes?
They intercept API requests to enforce policies before execution.

50. How do you perform disaster recovery in Kubernetes?
By backing up etcd, implementing multi-region clusters, and using Kubernetes-native backup tools.

Reply

or to participate.