Installing mini-kube in centos

Minikube
Minikube is the name of a software program written in Go, which can build a local Kubernetes cluster on a single host. It uses a meager amount of resources to run a mini Kubernetes deployment. Minikube is mainly used for testing purposes using different scenarios or versions of Kubernetes

Installing Minikube on CentOS
Step 1: Updating the System
The first step is to update the local repository to ensure the software you download is up to date
# sudo yum -y update

Step 2: Installing KVM Hypervisor
Since we are going to run the single node cluster inside a virtual machine, we need to set up a virtualization software
*Start by installing the required packages
# sudo yum  install epel-release -y
# sudo yum install libvirt qemu-kvm virt-install virt-top libguestfs-tools bridge-utils -y

*Then, start and enable the libvirtd service
# sudo systemctl start libvirtd
# sudo systemctl enable libvirtd

*Confirm the virtualization service is running with the command
# systemctl status libvirtd

*Next, add a user to the libvirt group
# sudo usermod -a -G libvirt $(whoami)

*Then, open the configuration file of the virtualization service
# sudo vi /etc/libvirt/libvirtd.conf

*Make sure that that the following lines are set with the prescribed values
unix_sock_group = "libvirt"
unix_sock_rw_perms = "0770"

*Finally, restart the service for the changes to take place
# sudo systemctl restart libvirtd.service

Step 3: Installing Minikube
Run the command to install wget: sudo yum -y install wget
*Download the Minikube binary package using the wget command
# wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

*Then, use the chmod command to give the file executive permission
# chmod +x minikube-linux-amd64

*Finally, move the file to the /usr/local/bin directory
# sudo mv minikube-linux-amd64 /usr/local/bin/minikube

*With that, we have finished setting up Minikube. Verify the installation by checking the version of the software
# minikube version
minikube version: v1.19.0

*Step 4: Installing Kubectl
Apart from installing Minikube, you also need to set up kubectl, the command-line tool for working with Kubernetes
*Run the following command to download kubectl
# curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl

*Give it executive permission
# chmod +x kubectl

*Move it to the same directory where we previously stored Minikube
# sudo mv kubectl  /usr/local/bin/

*Verify the installation by running
# kubectl version --client -o json
{
  "clientVersion": {
    "major": "1",
    "minor": "21",
    "gitVersion": "v1.21.0",
    "gitCommit": "cb303e613a121a29364f75cc67d3d580833a7479",
    "gitTreeState": "clean",
    "buildDate": "2021-04-08T16:31:21Z",
    "goVersion": "go1.16.1",
    "compiler": "gc",
    "platform": "linux/amd64"
  }

Step 5: Starting Minikube
To start using Minikube and start a single node cluster inside a virtual machine, we just need to run the command
# minikube start

Working with Kubernetes
Now that we have set up the required software and launched our single-node cluster, we can start experimenting with Kubernetes locally.




Recent Comments

No comments

Leave a Comment