• +91 9723535972
  • info@interviewmaterial.com

Kubernetes Interview Questions and Answers

Related Subjects

Kubernetes Interview Questions and Answers

Question - 71 : - How to write a Kubernetes scheduler?

Answer - 71 : -

The kube-scheduler is the default scheduler for Kubernetes. It is designed such that if you prefer, you can write your own one and use that instead.

Following is the syntax:

kube-scheduler [flags]
The scheduling life cycle:

  • A pod is created and the preferred state is mentioned, and without filling the node name, it is saved to etcd
  • The scheduler notices the new pod with no node bound
  • It finds a suitable node for that pod
  • It then informs the API server to bind the pod to the node, and next, the new desired state is saved to etcd
  • Kubelets watch the pods that are bound and start the containers on the particular node

Question - 72 : - What are the ways to provide API Security on Kubernetes?

Answer - 72 : -

Following are some of the ways that provide API Security:

  • Using the correct auth mode with the API server authentication mode= Node, RBAC
  • Ensuring that the traffic is protected by TLS
  • Using API authentication
  • Ensuring that kubeless protects its API via authorization-mode=Webhook
  • Monitoring RBAC failures
  • Removing default Service Account permissions
  • Ensuring that the kube-dashboard applies a restrictive RBAC policy
  • Implementing a pod security policy for container restrictions and the protection of the node
  • Using the latest version of kube

Question - 73 : - What is the difference between a replica set and a replication controller?

Answer - 73 : -

The difference is mainly in the selectors used for pod replication. A replica set uses set-based selectors, and replication controllers use equity-based selectors.

Question - 74 : - How does Kubernetes scale?

Answer - 74 : -

The kubectl scale command enables the ability to instantly change the number of replicas needed for running an application. While using this command, the new number of replicas need to be specified by setting the –replicas flag.

Question - 75 : - What is a Kubernetes context?

Answer - 75 : -

A context is a group of access parameters that has a cluster, a user, and a namespace. The current context is the cluster that is currently the default for kubectl, and all kubectl commands run against that cluster.

Question - 76 : - What do I need on-premises to run the Kubernetes architecture?

Answer - 76 : -

Many on-premises environments are remodeled to enable Kubernetes integration. Integrating storage, servers, and networking into a smoothly running environment requires top skills. For Kubernetes, deciding the right storage and networking equipment is crucial as it facilitates interaction with resources for storage, load balancers, etc. A critical part of Kubernetes’ value proposition is the ability to automate storage and the networking components.

Question - 77 : - How to set a static IP for Kubernetes load balancer?

Answer - 77 : -

Kubernetes Master assigns a new IP address.

We can set a static IP for Kubernetes load balancer by changing the DNS records whenever Kubernetes Master assigns a new IP address.

Question - 78 : - Where is the Kubernetes cluster data stored?

Answer - 78 : -

The primary data store of Kubernetes is etcd, which is responsible for storing all Kubernetes cluster data.

Question - 79 : - What does a kube-scheduler do?

Answer - 79 : -

The kube-scheduler has the job of assigning the nodes to the newly created pods.

Question - 80 : - What is load balancing on Kubernetes?

Answer - 80 : -

The process of load balancing will let us expose services. There are two types of load balancing when it comes to Kubernetes:

  • Internal load balancing: This is used for balancing the loads automatically and allocating the pods with the required configuration.
  • External load balancing: This directs the traffic from the external loads to the backend pods.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners