☸Minikube Installation and Creating First Pod

Day 31 Task: Launching your First Kubernetes Cluster.

Saurabh Dahibhate ♾️☁️
AWS in Plain English

--

Hello everyone I am back with another task of DevOps😊.

Awesome! We learned the architecture of one of the top most important tool “Kubernetes” in our previous task.

What about doing some hands-on now?

Let’s read about MiniKube and implement k8s in our local machine

01. What is MiniKube?

Minikube is an open-source tool that allows developers to run a single-node Kubernetes cluster on their local machine. It’s designed to make it easy to develop, test, and experiment with Kubernetes without the need for a full-blown production environment.

Minikube creates a virtual machine (VM) on your local computer and installs a lightweight version of Kubernetes in it. This allows developers to test and experiment with Kubernetes features, deploy and manage containerized applications, and explore different Kubernetes configurations and architectures in a safe and isolated environment.

Minikube is compatible with different virtualization technologies such as VirtualBox, Hyper-V, and KVM. It supports a wide range of Kubernetes features and add-ons, including container networking, storage, security, and more.

Minikube can also be easily integrated with popular development tools, such as IDEs and CI/CD pipelines, making it a popular choice for developers who want to work with Kubernetes on their local machines.

02. What are the Features of Minikube?

(a) Supports the latest Kubernetes release (+6 previous minor versions).

(b) Cross-platform (Linux, macOS, Windows).

(c) Deploy as a VM, a container, or on bare-metal.

(d) Multiple container runtimes (CRI-O, containerd, docker).

(e) Direct API endpoint for blazing fast image load and build.

(f) Advanced features such as LoadBalancer, filesystem mounts, FeatureGates, and network policy.

(g) Addons for easily installed Kubernetes applications.

(h) Supports common CI environments.

Here is Today’s Task on MiniKube:

01. Install Minikube on your local

  1. Launch EC2 instance with “Ubuntu” Instance type as “t3.medium”.

2. Connect the newly made instance and navigate to terminal screen.

3. Install docker by firing few commands commands such as “sudo apt-get update” and “sudo apt-get install docker.io”.

4. Install minikube using linux commands such as “curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64” and “sudo install minikube-linux-amd64 /usr/local/bin/minikube

5. Fire the command “minikube start” to start cluster. After doing so, you will definitely be getting an error.

6. Perform “sudo usermod -aG docker $USER && newgrp docker” and “minikube start — — driver=docker”.

7. Do “docker ps” to check whether after installation, minikube is in running status or not in kubernetes.

9. Next comes the step for kubectl installation. For the same, fire the commands “sudo snap install kubectl — classic”.

Let’s understand the concept pod

In Kubernetes, a pod is the smallest and simplest unit in the object model. It represents a single instance of a running process in a cluster. A pod can contain one or more containers, which share the same network namespace and storage volumes, and are scheduled and deployed together on the same host.

Pods are designed to be ephemeral and disposable, meaning that they can be easily created, destroyed, and replaced without affecting the overall availability or stability of the application. They are commonly used to host microservices, which are small, independent, and loosely-coupled components of a larger application.

By grouping related containers into a single pod, Kubernetes provides a way to manage the lifecycle and dependencies of the application components, as well as to isolate and scale them as needed.

You can read more about pod from here.

02. Create your first pod on Kubernetes through minikube.

  1. Docker, minikube and kubectl should be pre-installed in the instance. Make a directory by firing command “mkdir <directory_name>”.

2. Create a namespace using command “kubectl create namespace <name>” and give command “kubectl get namespaces” to check whether new namespace has been created or not.

3. Go inside newly made directory and create a pod by using command “vim pod.yaml”.

4. Create pod by giving command “kubectl apply -f pod.yaml”.

5. Give command “kubectl get pods — namespace=<namespace_name>” to check whether pod is created or not.

🔶That’s all about today’s task of DevOps journey.

🔸Thankyou for reading 👍.

If you liked this story then click on 👏👏 do follow for more interesting and helpful stories.

— — — — — — — — #keepLearning_DevOpsCloud ♾️☁️ — — — — — —

Minikube-Installation-and-Creating-First-Pod

More content at PlainEnglish.io.

Sign up for our free weekly newsletter. Follow us on Twitter, LinkedIn, YouTube, and Discord.

Interested in scaling your software startup? Check out Circuit.

--

--

- ⭐Passionate Web Developer and DevOps . 🎯 Like to stay up-to-date with the latest trends and insights.