Install minikube for Linux
One popular option for installing Kubernetes is through minikube, which creates a local Kubernetes cluster for different environments. Tests scripts and examples for the Altinity Kubernetes Operator are based on using minikube
to set up the Kubernetes environment.
The following guide demonstrates how to install minikube that support the Altinity Kubernetes Operator for the following operating systems:
- Linux (Deb based)
Minikube Installation for Deb Based Linux
The following instructions assume an installation for x86-64 based Linux that use Deb package installation. Please see the referenced documentation for instructions for other Linux distributions and platforms.
To install minikube
that supports running Altinity Kubernetes Operator:
kubectl Installation for Deb
The following instructions are based on Install and Set Up kubectl on Linux
-
Download the
kubectl
binary:curl -LO 'https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl'
-
Verify the SHA-256 hash:
curl -LO "https://dl.k8s.io/v1.22.0/bin/linux/amd64/kubectl.sha256"
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
-
Install
kubectl
into the/usr/local/bin
directory (this assumes that yourPATH
includesuse/local/bin
):sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
-
Verify the installation and the version:
kubectl version
Install Docker for Deb
These instructions are based on Docker’s documentation Install Docker Engine on Ubuntu
-
Install the Docker repository links.
-
Update the
apt-get
repository:sudo apt-get update
-
-
Install the prerequisites
ca-certificates
,curl
,gnupg
, andlsb-release
:sudo apt-get install -y ca-certificates curl gnupg lsb-release
-
Add the Docker repository keys:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
-
Add the Docker repository:
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" |sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
-
-
Install Docker:
-
Update the
apt-get
repository:sudo apt-get update
-
Install Docker and other libraries:
sudo apt install docker-ce docker-ce-cli containerd.io
-
-
Add non-root accounts to the
docker
group. This allows these users to run Docker commands without requiring root access.-
Add current user to the
docker
group and activate the changes to groupsudo usermod -aG docker $USER&& newgrp docker
-
Install Minikube for Deb
The following instructions are taken from minikube start.
-
Update the
apt-get
repository:sudo apt-get update
-
Install the prerequisite
conntrack
:sudo apt install conntrack
-
Download minikube:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
-
Install minikube:
sudo install minikube-linux-amd64 /usr/local/bin/minikube
-
To correct issues with the
kube-proxy
and thestorage-provisioner
, setnf_conntrack_max=524288
before startingminikube
:sudo sysctl net/netfilter/nf_conntrack_max=524288
-
Start minikube:
minikube start && echo "ok: started minikube successfully"
-
Once installation is complete, verify that the user owns the ~/.kube and ~/.minikube directories:
sudo chown -R $USER.$USER .kube
sudo chown -R $USER.$USER .minikube