Kubernetes
🎸 Kubernetes is an open-source container orchestration platform used for automating the deployment, scaling, and management of containerized applications.
🤘 It was originally developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).
🎸 Kubernetes allows you to define your application's infrastructure as code and deploy it across a cluster of machines.
🤘 It provides features such as automatic scaling, self-healing, rolling updates, and service discovery.
🎸 Kubernetes has a rich ecosystem of tools and plugins that enable integration with other systems and technologies.
🤘 It supports a variety of container runtimes, including Docker, CRI-O, and containers.
🎸 Kubernetes provides a flexible architecture that can be customized to suit the needs of different applications and environments
What are the benefits of using k8s?
There are several benefits to using Kubernetes, including:
🤘 Scalability: Kubernetes enables easy scaling of applications and services to meet demand by adding or removing resources as needed.
🤘 Portability: Kubernetes allows for easy deployment and management of applications across multiple environments, including on-premise, cloud, or hybrid environments.
🤘 Fault tolerance: Kubernetes provides self-healing capabilities that enable automatic recovery from failures, minimizing downtime and ensuring high availability.
🤘 Resource optimization: Kubernetes allows for efficient use of resources by scheduling containers on nodes with available resources and scaling up or down as needed.
🤘 Automation: Kubernetes automates many aspects of application deployment and management, including scaling, updates, and rollbacks, reducing the need for manual intervention
Explain the architecture of Kubernetes.
etcd:
A distributed key-value store used by Kubernetes to store and manage cluster state. It ensures consistency and high availability of the stored data, making it an essential component for the reliable operation of Kubernetes.
API server:
The primary management point for Kubernetes, responsible for handling RESTful API requests and modifying the cluster state accordingly. It provides a way to manage the cluster and its resources through a simple and unified interface.
Controller manager:
A Kubernetes component is responsible for managing controllers that monitor and respond to changes in the cluster, ensuring that the desired state is maintained. It automates many tasks and makes it easier to manage the overall state of the cluster.
Scheduler: A Kubernetes component responsible for scheduling workloads onto available nodes in the cluster based on resource availability and other constraints. It helps to ensure that resources are used efficiently and that workloads are deployed to the most appropriate nodes.
Kubelet:
A component that runs on each node in the cluster and is responsible for managing containers and ensuring that they are running as expected. It communicates with the API server to receive instructions on how to manage the containers.
Service proxy: Responsible for managing network traffic between services in the cluster. It helps to ensure that services can communicate with each other efficiently and securely.
kubectl:
A command-line tool that allows users to interact with the Kubernetes API server to manage the cluster and its resources. It provides a way to perform various administrative tasks, such as creating, updating, and deleting resources in the cluster.
What is Control Plane?
The Control Plane is responsible for managing the overall state of the cluster, including the state of each individual node, the configuration of each application, and the overall health of the cluster. The API server is the primary interface for managing the Kubernetes cluster, and it exposes a RESTful API that can be accessed using tools like kubectl.
Write the difference between kubectl and kubelets.
Explain the role of the API server.
✔️ The API server is the primary management point for Kubernetes.
✔️ It handles RESTful API requests and modifies the cluster state accordingly.
✔️ It provides a simple and unified interface for managing the cluster and its resources.
✔️ It performs authentication, authorization, and validation checks on incoming requests.
✔️ It updates the cluster's internal state by modifying the etcd datastore