Kuber Nates
Kuber Nates
Table of Contents
1. Introduction
10. Conclusion
1. Introduction
Overview
Kubernetes is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized
applications. It allows organizations to run applications e iciently across multiple nodes, ensuring high availability, scalability, and fault tolerance.
Kubernetes is widely used in cloud environments and supports various networking, storage, and security configurations.
Setting up a Kubernetes cluster provides a centralized platform to manage workloads, making it easier to deploy and maintain applications. By
configuring a cluster with a master node and worker nodes, users can take advantage of Kubernetes features like self-healing, load balancing, rolling
updates, and automated scaling.
Architecture
o Kubernetes v1.32
Network Plugin
o RAM: 4 GB
o Storage: 30G
Network Configuration
Prerequisite Configurations
Disable Swap (perform on all machines)
o The default behavior of a kubelet is to fail to start if swap memory is detected on a node. This means that swap should either be disabled
or tolerated by kubelet.
o Kubernetes networking required IP forwarding to be enabled in kernel. Perform below steps to enable it in kernel.
Download the public signing key for the Kubernetes package Repositories. (Perform on all Machines)
Verify that both Container run time and Kubelet have a same cgroup drive. It will be either “systemd” or “cgroup”. By default it will be system
mkdir -p $HOME/.kube
Above setting will be revoked after restart, so make it persistent and enable bridge tra ic filtering
Adding settings to sysctl.conf file so that it will make persistent. And apply the changes
If swap space is not disabled on worker nodes and ip_forwarding was not enabled the worker node will not able to join the master node.
See the below error:
You need to swapo and enable the ip_forwarding to solve the issues.
7. Verifying Cluster Status
10. Conclusion
Congratulations! You have successfully set up a Kubernetes cluster with a control plane and worker nodes, deployed a networking solution, and
verified the cluster’s health. This guide provided step-by-step instructions on:
Installing and configuring Kubernetes components.
With the cluster up and running, you can now explore advanced Kubernetes features, such as:
Deploying Stateful Applications – Learn how to manage databases and persistent storage with Persistent Volumes (PVs) and Persistent
Volume Claims (PVCs).
Implementing Ingress Controllers – Set up ingress controllers to expose applications via custom domain names.
Securing the Cluster – Apply Role-Based Access Control (RBAC), Network Policies, and Pod Security Standards.
Monitoring & Logging – Use Prometheus, Grafana, and Fluentd to monitor and analyze cluster activity.
Scaling & Auto-healing – Learn about Horizontal Pod Autoscaler (HPA) and cluster auto-scaling.
This Kubernetes setup lays the foundation for container orchestration and microservices deployment. As a next step, consider integrating CI/CD
pipelines and service mesh technologies like Istio to enhance cluster e iciency.
Keep experimenting, deploying, and optimizing your Kubernetes cluster for real-world workloads!
Next Steps:
**Backup and Disaster Recovery** - Use `etcdctl snapshot save` to back up etcd.
**Upgrading Kubernetes** - Follow best practices for updating Kubernetes versions.
**Setting Up Monitoring** - Implement Prometheus and Grafana for cluster monitoring.
Appendix
This Kubernetes Cluster Setup Guide is intended for educational purposes only. The content, including commands, configurations, and
explanations, is meant to help learners understand and deploy Kubernetes in a controlled environment.
Unauthorized copying, redistribution, or commercial use of this guide is strictly prohibited. If you wish to use this content for any purpose beyond
personal learning, please seek permission.
For inquiries, collaboration, or further assistance, feel free to reach out to:
Tausif Shaikh
Email: shaikh.only@gmail.com
Contact: +91 99244 25668