The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane. The main implementation of a Kubernetes API server is kube-apiserver . kube-apiserver is designed to scale horizontally—that is, it scales by deploying more instances. You can run several instances of kube-apiserver and balance traffic between those instances. etcd Consistent and highly-available key value store used as Kubernetes’ backing store for all clusterdata. If your Kubernetes cluster uses etcd as its backing store, make sure you have a back up plan for the data2.
You use etcd in Kubernetes as a backend for service delivery. It is one of the master components used for cluster management. You can run etcd in an external cluster or as a pod on your Kubernetes master. If you run it as an external cluster you can benefit from an extra layer of security and resiliency due to its isolation from the master3.
References:
Operating etcd clusters for Kubernetes
Kubernetes Components
What Is etcd and How Is it Used in Kubernetes?
Question 2
Why is a headless service type recommended for StatefulSets in Kubernetes?
Options:
A.
StatefulSets require a load balancer with a single IP address to balance traffic across randomly named pods.
B.
Pods managed by a StatefulSet have randomly named hashes that CANNOT be used by a regular service for load balancing.
C.
Pods managed by a StatefulSet have stable names and can be accessed directly without a service IP address.
Answer:
C
Explanation:
Explanation:
A headless service is defined by setting the clusterIP field to None in the service spec. This tells Kubernetes not to allocate a cluster IP for the service, and to create DNS records only.
For StatefulSets, you can use a headless service to control the domain of the pods. The pods that belong to a StatefulSet have a unique identity that is comprised of an ordinal, a stable network identity, and stable storage. The identity sticks to the pod, regardless of which node it’s (re)scheduled on.
Each pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the pod. The pattern for the constructed hostname is (statefulsetname)−(ordinal). The example above will create three pods named web-0,web-1,web-2.
A StatefulSet can use a headless service to provide network identity for its pods. The service is responsible for creating a DNS record for each pod in the form (podname).(governing service domain). For the previous example, the headless service named nginx will create DNS records for web-0.nginx, web-1.nginx, and web-2.nginx.
References:
Headless Services
StatefulSets
Is it required to use a headless service for statefulsets?
Question 3
What are some features of Kubernetes? Note: There are 3 correct Answers to this question.
Options:
A.
Process management and optimization
B.
Immutability and self-healing
C.
Extensibility and ecosystem
D.
Automated rollouts and rollbacks
E.
Integration and assessment
Answer:
B, C, D
Explanation:
Explanation:
Some of the features of Kubernetes are:
Immutability and self-healing: Kubernetes treats pods as immutable, meaning that they are not modified after they are created. Instead, pods are replaced with new ones when they need to be updated or repaired. This ensures that the pods are always in a consistent and predictable state. Kubernetes also monitors the health and availability of the pods and automatically restarts, reschedules, or replicates them if they fail or become unresponsive1.
Extensibility and ecosystem: Kubernetes is designed to be extensible and modular, allowing users to customize and extend its functionality according to their needs. Kubernetes supports various extensions, such as custom resources, operators, admission controllers, schedulers, network plugins, storage plugins, and more. Kubernetes also has a large and vibrant ecosystem of tools, services, and applications that are built on top of or integrate with it2.
Automated rollouts and rollbacks: Kubernetes enables users to deploy and update their applications with zero downtime, using declarative configuration and rolling updates. Kubernetes ensures that only a certain number of pods are changed at a time, and that the new pods are ready before terminating the old ones. Kubernetes also tracks the history of each update and allows users to roll back to a previous version if something goes wrong3.