DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Docker Containers Don’t Know Your Model Is Still Loading
  • Smart Deployment Strategies for Modern Applications
  • How We Diagnosed a Hidden Scheduler Failure in a Docker Swarm Cluster Serving 2 Million Users
  • Java Backend Development in the Era of Kubernetes and Docker

Trending

  • Persisting Cookies Across JAX-WS Service Calls Using a Custom SOAP Handler
  • The "Just Read the Code" Myth Is Killing Your AI Workflow
  • Going All In On the JVM 25 Virtual Threads
  • 7 Swift Features That Will Let You Delete Code Tomorrow

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Coding
  3. Tools
  4. Install Docker, Kubernetes and Minikube on Linux Mint

Install Docker, Kubernetes and Minikube on Linux Mint

Docker container packages up the code of an application and all its dependencies so that the application can run unchanged in any environment.

By 
Eugen Hoble
·
Oct. 03, 22 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
10.0K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

1. Install Docker 

Docker container packages up the code of an application and all its dependencies so that the application can run unchanged in any environment. A Docker container includes everything needed to run an application: code, runtime, system tools, system libraries, and settings. More about Docker here and here.

In Linux Mint, open a terminal and type: 

 
sudo apt update
sudo apt install docker*



If you want to execute the docker commands with the non-root user, you must add the user to the docker group by issuing the below-mentioned command:

 
sudo usermod -aG docker $USER



2. Install Kubernetes

Containers vs. virtual machines vs. traditional infrastructure

Kubernetes, also known as “k8s” or “Kube,” is an open-source container orchestration platform that automates the deployment, management, and scaling of containerized applications. 

Containers, like Docker, are lightweight, executable application components that combine application source code with all the operating system (OS) libraries and dependencies required to run the code in any environment and allow multiple applications to share a single instance of an OS by isolating processes and controlling the amount of CPU, memory, and disk those processes can access. 

To install Kubernetes in Linux Mint, run the following commands in a terminal:

 
sudo apt-get update
sudo apt-get install -y ca-certificates curl


Download the Google Cloud public signing key:

 
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg


Add the Kubernetes apt repository:

 
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list


Update apt package index with the new repository and install kubectl:

 
sudo apt-get update
sudo apt-get install -y kubectl


3. Install Minikube

To manage a local development Kubernetes cluster, Minikube can be used.

To install the latest minikube stable release on x86-64 Linux using binary download: To install the latest minikube stable release on x86-64 Linux using binary download:

 
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube


From a terminal, run:

 
minikube start --driver=docker


To make docker the default driver:

 
minikube config set driver docker



4. Minikube Profiles

All the profiles configuration can be found in the ~/.minikube/profiles folder. 

When we start a new Minikube instance without providing a profile name, a default profile named minikube will be created. Each profile is used for the configuration of a new Kubernetes cluster.

Suppose we cat the config.json file in that subfolder. In that case, we will see a MachineConfig block with information about the VM instance and a KubernetesConfig block providing information on the associated Kubernetes cluster.


Once the start command is completed, kubectl automatically targets the new cluster. A new k8s context with the same name as the profile is also added to the~/.kube/config file.

Let’s spin up another Minikube instance with 2 CPUs and 2048 MB of memory.

 
minikube start --driver=docker -p test1 --cpus=2 --memory=2048





A new subfolder named test1 now appears under the ~/.minikube/profiles folder. The config.json in the subfolder contains information about the new VM and Kubernetes cluster.


5. Switching Minikube Profiles


6. Minikube Dashboard

Before deploying any application.

After deploying ngix inside a docker container.

If we want to forward the port, use:

 
kubectl port-forward service/hello-minikube 7080:80


Minikube dashboard will now show the ngxi deployed:

Minikube dashboard


More Minikube tutorials are here.

Kubernetes Linux Mint Docker (software) Linux (operating system)

Opinions expressed by DZone contributors are their own.

Related

  • Docker Containers Don’t Know Your Model Is Still Loading
  • Smart Deployment Strategies for Modern Applications
  • How We Diagnosed a Hidden Scheduler Failure in a Docker Swarm Cluster Serving 2 Million Users
  • Java Backend Development in the Era of Kubernetes and Docker

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook