Skip to content

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 pip package manager (python3-pip).
  • The Docker library for Python.
  • Root or sudo privileges to install binaries into /usr/local/bin and 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.

  1. 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.
  2. kubectl Installation:

    • The stable version of Kubernetes is determined by querying https://dl.k8s.io/release/stable.txt.
    • The kubectl binary is downloaded from the dynamic URL https://dl.k8s.io/release/{version}/bin/linux/amd64/kubectl.
    • The binary is saved to /usr/local/bin/kubectl with 0755 permissions.
  3. Environment Configuration:

    • The PATH environment variable is updated in ~/.bashrc to include /usr/local/bin.
    • The shell configuration is reloaded to apply the changes immediately.

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:

minikube start --driver=docker --force

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:

minikube start --driver=docker --force

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.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×