Question:- How to write a Kubernetes scheduler?
Answer:- 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: 1. A pod is created and the preferred state is mentioned, and without filling the node name, it is saved to etcd 2. The scheduler notices the new pod with no node bound 3. It finds a suitable node for that pod 4. It then informs the API server to bind the pod to the node, and next, the new desired state is saved to etcd 5. Kubelets watch the pods that are bound and start the containers on the particular node
Question:- What are the ways to provide API Security on Kubernetes?
Answer:- 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:- If an organization is looking for ways to improve its deployment methods and desires a more scalable and responsive platform, what should be done?
Answer:- The company should move to a cloud environment and implement a microservice architecture for implementing Docker containers. Once the base framework is set up, Kubernetes can be used for the autonomous development of applications and the quick delivery of the same by the team.
Question:- If an organization has a large distributed system with several data centers, virtual machines, and a huge number of employees working on various tasks, how can the tasks be managed with consistency with the help of Kubernetes?
Answer:- The company can do well with something that offers scale-out capability, agility, and the DevOps practice to the cloud-based applications. Kubernetes, in this situation, can enable the customization of the scheduling architecture and support multiple container formats. This results in greater efficiency as well as provides support for various container networking solutions and container storage.
Question:- What is the difference between a replica set and a replication controller?
Answer:- 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:- How does Kubernetes scale?
Answer:- 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:- What is a Kubernetes context?
Answer:- 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:- Give examples of some recommended security measures for Kubernetes.
Answer:- • Defining resource quotas • Auditing support • Providing restricted access to etcd • Regular security updates • Network segmentation • Strict resource policies • Regular scans for security vulnerabilities • Using images from repositories that are authorized
Question:- What is a Headless Service?
Answer:- The headless service is like normal services but without the Cluster IP. It enables direct access to pods without the need for a proxy.
Question:- What is Minikube?
Answer:- The Minikube makes it easy for the local running of Kubernetes. Within a virtual machine, the Minikube runs a single-node Kubernetes cluster.
Question:- What is Kubectl?
Answer:- Kubectl is a Kubernetes command-line tool that is used for deploying and managing applications on Kubernetes. Kubectl is especially useful for inspecting the cluster resources, and for creating, updating, and deleting the components.
Question:- What is GKE?
Answer:- GKE is Google Kubernetes Engine which is used for managing and orchestrating systems for Docker containers. GKE also lets us orchestrate container clusters within the Google Public Cloud.
Question:- What is kube-proxy?
Answer:- The kube-proxy runs on each of the nodes. It can do simple tasks such as TCP, UDP, forwarding, and so on. It shows the services in the Kubernetes API on each node.
Question:- What are the components of a Kubernetes Master?
Answer:- The components of the Kubernetes Master include the API server, the controller manager, the Scheduler, and the etcd components. The Kubernetes Master components are responsible for running and managing the Kubernetes cluster.