16. What’s Ingress in Kubernetes?
Ingress is an API object that manages exterior entry to companies, offering:
- Site visitors routing guidelines
- SSL/TLS termination
- Load balancing
17. What are the various kinds of companies in Kubernetes?
- ClusterIP (default) — Inside service throughout the cluster.
- NodePort — Exposes the service through a static port on every node.
- LoadBalancer — Creates an exterior load balancer.
- ExternalName — Maps companies to an exterior DNS.
18. What’s a Kubernetes Load Balancer?
A Load Balancer distributes incoming community visitors throughout a number of pods to:
- Optimize useful resource utilization.
- Improve fault tolerance.
- Enhance software availability.
19. How do pods talk inside a cluster?
Pods talk through:
- Localhost (throughout the similar pod).
- Cluster DNS Service (utilizing Kubernetes Companies).
- Surroundings Variables (auto-generated by Kubernetes).
20. What’s Position-Based mostly Entry Management (RBAC) in Kubernetes?
RBAC restricts consumer entry by defining:
- Roles (permissions for assets).
- RoleBindings (assign roles to customers/teams).
- ClusterRoles (permissions for whole clusters).
21. How will you safe a Kubernetes cluster?
- Restrict entry to etcd (because it incorporates delicate knowledge).
- Use Community Insurance policies to isolate workloads.
- Allow role-based entry management (RBAC).
- Monitor and log exercise utilizing instruments like Prometheus.
22. What are some Kubernetes monitoring instruments?
- Prometheus — Metrics assortment and alerting.
- Grafana — Interactive visualization dashboard.
- cAdvisor — Actual-time container monitoring.
- Fluentd — Log processing and forwarding.
23. How do you guarantee excessive availability in Kubernetes?
- Use a number of grasp nodes (HA setup).
- Allow Pod Disruption Budgets (PDB) to attenuate downtime.
- Implement rolling updates as an alternative of recreating pods.
24. How will you assign a Pod to a selected node?
Through the use of node affinity or taints & tolerations, e.g.:
25. What occurs when a employee node fails?
- Kubernetes detects failure and marks the node as NotReady.
- The scheduler strikes pods to different wholesome nodes.
- If working on the cloud, auto-scaling could provision a brand new node.
26. How do you carry out upkeep on a Kubernetes node?
Use the next instructions:
1. What are the 2 forms of Kubernetes pods?
- Single-container pods: Include just one container (most typical).
- Multi-container pods: Include a number of containers that share storage and networking.
2. What’s a Job in Kubernetes?
A Job ensures {that a} pod runs to completion and may restart failed duties till completion. It’s used for batch processing duties.
3. What’s a Persistent Quantity (PV) in Kubernetes?
A Persistent Quantity (PV) is a cluster-wide storage useful resource, separate from pods, that retains knowledge even when a pod is deleted.
4. What’s a Persistent Quantity Declare (PVC)?
A Persistent Quantity Declare (PVC) permits customers to request storage assets dynamically from Persistent Volumes.
5. How do you expose a Kubernetes service externally?
Use NodePort, LoadBalancer, or Ingress to show companies.
6. How does a Kubernetes Headless Service work?
A Headless Service doesn’t assign a ClusterIP and gives direct DNS-based discovery to backend pods.
7. What’s the distinction between ClusterIP, NodePort, and LoadBalancer?
- ClusterIP: Accessible solely inside the cluster.
- NodePort: Opens a static port on all nodes for exterior entry.
- LoadBalancer: Makes use of a cloud supplier’s exterior load balancer.
8. How does Kubernetes deal with auto-scaling?
- Horizontal Pod Autoscaler (HPA): Scales pods primarily based on CPU/reminiscence utilization.
- Vertical Pod Autoscaler (VPA): Adjusts useful resource requests and limits for current pods.
- Cluster Autoscaler: Provides/removes employee nodes.
9. How will you optimize workload distribution in Kubernetes?
- Use Affinity and Anti-affinity guidelines for node placement.
- Implement Horizontal Pod Autoscaler (HPA).
- Use Useful resource Requests & Limits to optimize CPU/reminiscence utilization.
10. What occurs when a Kubernetes pod exceeds its reminiscence restrict?
- Kubernetes terminates the pod with an OOM (Out of Reminiscence) error.
- The container receives a SIGKILL sign.
11. How do you obtain zero-downtime deployments in Kubernetes?
- Use Rolling Updates to replace pods incrementally.
- Deploy Canary releases to check updates on a small subset of customers.
- Implement Readiness Probes to make sure visitors is just despatched to wholesome pods.
12. What safety greatest practices needs to be adopted in Kubernetes?
- Allow Position-Based mostly Entry Management (RBAC).
- Use Community Insurance policies to isolate workloads.
- Allow Pod Safety Insurance policies (PSP).
- Limit entry to etcd.
- Scan container photos for vulnerabilities.
13. What are some challenges of working Kubernetes in manufacturing?
- Safety dangers (misconfigured RBAC, uncovered APIs).
- Advanced networking (Ingress, Load Balancing, Service Mesh).
- Useful resource optimization (CPU/reminiscence utilization).
- Monitoring and logging at scale.
14. What occurs when the Grasp Node fails?
- If HA (Excessive Availability) is not configured, the cluster turns into unresponsive.
- In an HA setup, one other grasp node takes over.
15. How do you improve a Kubernetes cluster?
- Backup cluster knowledge.
- Improve Management Airplane (Grasp Node) first.
- Improve Employee Nodes utilizing a rolling replace.
- Confirm all elements after the improve.