Skip to content

Deployment Overview of Minikube on Server

Prerequisites and Basic Requirements

The following requirements must be met on the target server before deploying the application:

  • Operating System: Ubuntu-based Linux distribution.

  • Privileges: Root access or sudo privileges are required to install system packages and modify the /usr/local/bin directory.

  • Dependencies:

    • Python 3 pip (python3-pip) package installed.

    • Python docker library installed via pip.

  • Network: Access to external repositories (Google Cloud Storage and Kubernetes release URLs) to download binaries.

File and Directory Structure

The deployment places binaries and configuration files in the following locations:

  • Minikube Binary: /usr/local/bin/minikube

  • Kubectl Binary: /usr/local/bin/kubectl

  • Shell Configuration: ~/.bashrc

Application Installation Process

The application components are installed using manual download commands and executable setup scripts. The versioning for the tools is determined dynamically during the download process:

  1. Minikube: The latest release for Linux AMD64 architecture is downloaded from the Google Cloud Storage bucket and placed in /usr/local/bin/minikube.

  2. kubectl: The stable version is determined by querying the Kubernetes release URL, then the corresponding Linux AMD64 binary is downloaded to /usr/local/bin/kubectl.

  3. Execution: The binaries are made executable, and the system PATH is updated in the user's bash configuration file to include /usr/local/bin.

Docker Containers and Their Deployment

Minikube is configured to run using the Docker driver. The initialization command enforces the following:

  • Command: minikube start --driver=docker --force

  • Driver: docker

  • Force Flag: The --force flag is applied during startup to overwrite existing instances if necessary.

Access Rights and Security

File permissions are set during the installation process to ensure the binaries are executable by the system:

  • Minikube: The chmod +x command grants execute permissions to /usr/local/bin/minikube.

  • kubectl: The download process sets the file mode to 0755 for /usr/local/bin/kubectl, granting read and execute permissions to all users.

Starting, Stopping, and Updating

The service management is handled via command-line interface (CLI) tools installed in /usr/local/bin.

Starting the Service

To start the Minikube cluster, execute the following command:

minikube start --driver=docker --force

Updating the Path Environment

After installation, the ~/.bashrc file is modified to include the new binaries in the system PATH. To apply these changes immediately without rebooting, the bash configuration is sourced:

source ~/.bashrc

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