DevOps Classroomnotes 30/Nov/2022

Kubernetes Installations

  • K8s has many installation options
    • single node k8s cluster
      • k3c
      • kind
      • minikube
    • Multi node k8s cluster
      • manual installations:
      • kubernetes as a service: Refer Here
        • aws => EKS (Elastic Kubernetes Services)
        • azure => AKS (Azure Kubernetes Service)
        • gcp => GKE (Google Kubernetes Engine)

Installing k8s using kube-adm

  • Lab Setup
    Preview
  • Ports to be opened Refer Here
  • Choose machines with atleast 2 vcpus and 2 GB of RAM
  • Our runtime is Docker Refer Here
  • Steps:

Install cri-dockerd

  • To install cri-dockerd we need git and go
  • Installing go Refer Here
###Install GO###
wget https://storage.googleapis.com/golang/getgo/installer_linux
chmod +x ./installer_linux
./installer_linux
source ~/.bash_profile
  • Steps
sudo -i

###Install GO###
wget https://storage.googleapis.com/golang/getgo/installer_linux
chmod +x ./installer_linux
./installer_linux
source ~/.bash_profile
git clone https://github.com/Mirantis/cri-dockerd.git
cd cri-dockerd
mkdir bin
go build -o bin/cri-dockerd
mkdir -p /usr/local/bin
install -o root -g root -m 0755 bin/cri-dockerd /usr/local/bin/cri-dockerd
cp -a packaging/systemd/* /etc/systemd/system
sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service
systemctl daemon-reload
systemctl enable cri-docker.service
systemctl enable --now cri-docker.socket
sudo apt update
sudo apt-get install -y apt-transport-https ca-certificates curl
sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
  • To create a cluster, login into master node and execute the following Refer Here
sudo -i
kubeadm init --pod-network-cidr=10.244.0.0/16
  • while initializing we got an error w.r.t to multiple CRI endpoints we need to set the right one
    Preview
  • We will fix this and initialize cluster in next session

k8s playground

  • Refer Here to access
  • To work with k8s without installation
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube