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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  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.

Eugen Hoble user avatar by
Eugen Hoble
·
Oct. 03, 22 · Tutorial
Like (1)
Save
Tweet
Share
5.14K Views

Join the DZone community and get the full member experience.

Join For Free

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.

Popular on DZone

  • Key Considerations When Implementing Virtual Kubernetes Clusters
  • Quick Pattern-Matching Queries in PostgreSQL and YugabyteDB
  • Building a Scalable Search Architecture
  • Utilize OpenAI API to Extract Information From PDF Files

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: