logo
Menu
Kubernetes Cluster Setup using KubeAdm

Kubernetes Cluster Setup using KubeAdm

Kubernetes Kubeadm installation in Amazon Linux.

Published May 3, 2024
Introduction:
  • Introduce the significance of Kubernetes in modern cloud-native application deployment.
  • Highlight the role of Kubeadm as a Kubernetes cluster bootstrapping tool.
  • Outline the purpose of the post: to delve into the theory behind Kubeadm installation on AWS and discuss best practices.
Understanding Kubeadm:
  • Explain Kubeadm as a tool for deploying Kubernetes clusters.
  • Highlight its simplicity and focus on automating the manual processes involved in setting up a cluster.
  • Discuss its role in providing a consistent and reliable Kubernetes deployment experience.
  • AWS Infrastructure Considerations:
  • Explore the unique considerations when deploying Kubernetes on AWS.
  • Discuss networking options, such as Amazon VPC and Subnets, and their impact on Kubernetes cluster communication.
  • Highlight the importance of IAM roles for securing access to AWS resources.
  • Useful Commands for installation of kubeadm
These below commands useful for installation of kubeadm
  • 1.curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
  • 2.curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
  • 3.echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
  • chmod +x kubectl
  • mkdir -p ~/.local/bin
  • mv ./kubectl ~/.local/bin/kubectl
  • # and then append (or prepend) ~/.local/bin to $PATH
  • 4.# This overwrites any existing configuration in /etc/yum.repos.d/kubernetes.repo
  • cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
  • [kubernetes]
  • name=Kubernetes
  • baseurl=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/
  • enabled=1
  • gpgcheck=1
  • gpgkey=https://pkgs.k8s.io/core:/stable:/v1.26/rpm/repodata/repomd.xml.key
  • EOF
  • 5.sudo yum install -y kubectl
  • 6.sudo yum install -y kubelet kubeadm
  • 7.ls /etc/kubernetes/
  • 8.sudo cat /etc/kubernetes/manifests/kube-apiserver.yaml
  • 9.sudo kubeadm init --pod-network-cidr=192.168.0.0/16
  • After successfully installation of kubeadm in your master node you visible to one command join command by using that command add nodes into cluster.
Thank you.
 

3 Comments