Skip to content

Running Multiple Kubernetes Playgrounds: Your Guide to Minikube Magic!

Avatar photo

https://www.linkedin.com/in/gineesh/ https://twitter.com/GiniGangadharan

Have you ever wanted to experiment with Kubernetes, but felt a little intimidated by setting up a complex cluster? Well, fear not! minikube comes to the rescue, allowing you to run your own lightweight Kubernetes cluster right on your local machine. But what if you need more than one testing ground? Buckle up, because minikube lets you create multiple mini-clusters for all your Kubernetes adventures!

Getting Started: Installing minikube

First things first, we need to install minikube. This is a straightforward process. Just copy and paste the following commands into your terminal:

# Download the installer
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64  

# Make it accessible
$ sudo install minikube-linux-amd64 /usr/local/bin/minikube            

Starting Your First minikube Playground

Now, let’s fire up a minikube cluster! We’ll use VirtualBox as the driver for this one. Run this command in your terminal:

$ minikube start --driver=virtualbox

Peeking Inside Your Playground (Optional):

If you don’t have kubectl installed or have a different version, you can use minikube to get information about your cluster’s Pods (running containers). This command retrieves details about Pods across all namespaces:

$ minikube kubectl -- get pods -A

Exploring Your Playground (Optional):

Want a visual interface to interact with your cluster? No problem! Use this command to launch the Kubernetes Dashboard:

$ minikube dashboard

Cleaning Up Your Playground

When you’re done experimenting, you can shut down the minikube VM with this command:

$ minikube stop

Multiple Playgrounds, More Fun!

That was your first minikube cluster, but the fun doesn’t stop there! The magic of minikube is that you can create multiple clusters. Here’s the key: give each cluster a unique name using the --profile flag.

Creating a New Playground with Podman:

Let’s create a second cluster named cluster2-podman and use Podman as the driver:

$ minikube start --profile cluster2-podman --driver=podman

Taking a Break from Playground #2

Just like before, you can stop and remove this cluster whenever you want:

$ minikube stop --profile cluster2-podman
$ minikube delete --profile cluster2-podman

There you have it! With minikube, you can have multiple, isolated Kubernetes playgrounds to test your deployments, configurations, and anything else your heart desires. So, fire up those minikube clusters and start exploring the wonderful world of Kubernetes!

Disclaimer:

The views expressed and the content shared in all published articles on this website are solely those of the respective authors, and they do not necessarily reflect the views of the author’s employer or the techbeatly platform. We strive to ensure the accuracy and validity of the content published on our website. However, we cannot guarantee the absolute correctness or completeness of the information provided. It is the responsibility of the readers and users of this website to verify the accuracy and appropriateness of any information or opinions expressed within the articles. If you come across any content that you believe to be incorrect or invalid, please contact us immediately so that we can address the issue promptly.

Avatar photo


https://www.linkedin.com/in/gineesh/ https://twitter.com/GiniGangadharan
Gineesh Madapparambath is the founder of techbeatly and he is the co-author of The Kubernetes Bible, Second Edition. and the author of ๐—”๐—ป๐˜€๐—ถ๐—ฏ๐—น๐—ฒ ๐—ณ๐—ผ๐—ฟ ๐—ฅ๐—ฒ๐—ฎ๐—น-๐—Ÿ๐—ถ๐—ณ๐—ฒ ๐—”๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป. He has worked as a Systems Engineer, Automation Specialist, and content author. His primary focus is on Ansible Automation, Containerisation (OpenShift & Kubernetes), and Infrastructure as Code (Terraform). (aka Gini Gangadharan - iamgini.com)

Comments

1 Response

  1. […] Running Multiple Kubernetes Playgrounds: Your Guide to Minikube Magic! […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.