Introduction to Kubernetes
Kubernetes, also known as K8s, is an open-source system for automating containerized applications' deployment, scaling, and management. In 2014, Google introduced Kubernetes as an open-source written in GoLang and later donated it to CNCF (Cloud Native Computing Foundation).
Features of K8s
Orchestration (managing all the containers inside the cluster)
Autoscaling
Auto Healing
Load-balancing
Platform Independent
Health monitoring of containers
Fault Tolerance (failure of the node/pod)
Rollback (going back to previous versions)
Batch Execution
Architecture of K8s
The architecture of a K8s cluster consists of 2 parts namely the Control Plane and the Node. The number of nodes can now vary according to the user's requirements. The control plane works with 4 components and they are :
Master Node: The master node is responsible for managing and coordinating the entire Kubernetes cluster. It consists of several components that interact with each other via APIs.
API Server: This is the entry point of the K8s cluster. It directly interacts with the user with the help of kubectl command. It is also responsible for scaling the server per the load/traffic. In other words, the API server is the front end of the control plane.
etcd: It is the Kubernetes backing store. Stores metadata and status of the cluster.
Scheduler: This component ensure pod replacement in the node. It assigns the node(s) to create and run the pods.
Controller Manager: It keeps track of what's happening in the cluster.
Worker Node: Worker nodes host pods, and each pod runs one or more containers.
Kubelet: The Kubelet is the agent that runs on each worker node. It communicates with the control plane components to receive instructions on which pod to run and maintains the desired state of the pod.
Container Runtime: The container runtime is responsible for running the containers within the pod. Kubernetes supports a variety of container runtimes, such as Docker, rkt, or CRI-O.
kube-proxy: kube-proxy is the network proxy and load balancer that runs on each worker node. It directs traffic to the correct pod based on the IP address and port number of the service.
Google Kubernetes Engine (GKE)
Google Kubernetes Engine (GKE) is a fully managed Kubernetes service provided by the Google Cloud Platform. It enables you to deploy, manage, and scale containerized applications on Kubernetes clusters.
Some of the key features of GKE are:
Fully Managed: GKE is fully managed by Google, which means that the underlying infrastructure, including the master nodes, is managed by Google. This eliminates the need to manage and maintain your own Kubernetes cluster.
Scalability: GKE allows you to easily scale your cluster based on your application's resource requirements. You can add or remove nodes to your cluster as needed to ensure that your application has the resources it needs.
Automated Upgrades: GKE automatically upgrades your cluster to the latest version of Kubernetes, ensuring that you have access to the latest features and bug fixes.
Integration with Google Cloud Platform: GKE integrates with other Google Cloud Platform services, such as Cloud Storage, Cloud SQL, and Cloud Build, making it easy to build and deploy your applications on Google Cloud.
Monitoring and Logging: GKE provides built-in monitoring and logging, allowing you to monitor your cluster's resource usage, health, and performance.
Security: GKE provides several security features, including isolated virtual networks, identity and access management, and integration with Google Cloud Security Command Center.
Conclusion
In conclusion, GKE is a powerful and easy-to-use platform for deploying, managing, and scaling containerized applications on Kubernetes clusters. Its fully managed nature allows developers to focus on building and deploying their applications without worrying about infrastructure management. Google's integration with other Google Cloud Platform services also makes it easy to build and deploy applications on Google Cloud. Finally, GKE's monitoring, logging, and security features ensure that your applications are secure, performant, and highly available.