Deployment Overview of Minikube on Server¶
Prerequisites and Basic Requirements¶
The deployment requires a Linux-based operating system, specifically Ubuntu, as indicated by the configuration tasks. The following components must be present or installed on the server:
- Python 3 with the
pippackage manager (python3-pip). - The Docker library for Python.
- Root or sudo privileges to install binaries into
/usr/local/binand modify system configuration files. - Network access to download binaries from Google Cloud Storage and the Kubernetes release repository.
File and Directory Structure¶
The deployment places executable binaries and configuration updates in the following locations:
- Minikube Binary:
/usr/local/bin/minikube - kubectl Binary:
/usr/local/bin/kubectl - User Shell Configuration:
~/.bashrc
The ~/.bashrc file is modified to include /usr/local/bin in the system PATH variable, ensuring the commands are accessible from any terminal session.
Application Installation Process¶
The installation involves downloading and configuring two primary components: Minikube and kubectl.
-
Minikube Installation:
- The latest version of Minikube for Linux AMD64 is downloaded from
https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64. - The binary is saved to
/usr/local/bin/minikube. - Execute permissions are applied to the binary using
chmod +x.
- The latest version of Minikube for Linux AMD64 is downloaded from
-
kubectl Installation:
- The stable version of Kubernetes is determined by querying
https://dl.k8s.io/release/stable.txt. - The
kubectlbinary is downloaded from the dynamic URLhttps://dl.k8s.io/release/{version}/bin/linux/amd64/kubectl. - The binary is saved to
/usr/local/bin/kubectlwith0755permissions.
- The stable version of Kubernetes is determined by querying
-
Environment Configuration:
- The
PATHenvironment variable is updated in~/.bashrcto include/usr/local/bin. - The shell configuration is reloaded to apply the changes immediately.
- The
Docker Containers and Their Deployment¶
Minikube is configured to run using the Docker driver. The deployment process initiates the Minikube cluster with the following command:
This command starts a local Kubernetes cluster within a Docker container, forcing the creation of a new cluster if one already exists.
Starting, Stopping, and Updating¶
The primary command to start the Minikube environment is:
To manage the cluster lifecycle, the standard Minikube commands are available via the installed binary:
- Start:
minikube start - Stop:
minikube stop - Delete:
minikube delete - Status:
minikube status
Updates to the binaries require re-downloading the latest versions from their respective source URLs and replacing the files in /usr/local/bin.