Day 31: Launching your First Kubernetes Cluster with Nginx running


What is Minikube?

Minikube serves as a convenient tool for swiftly setting up a local Kubernetes cluster across various operating systems like macOS, Linux, and Windows. By providing a lightweight, single-node environment, Minikube streamlines the deployment process of Kubernetes, making it more accessible for developers.


Features of Minikube:

  • Kubernetes Version Compatibility: Supports the latest Kubernetes release along with several previous minor versions.

  • Cross-Platform Support: Compatible with Linux, macOS, and Windows operating systems.

  • Flexible Deployment Options: Offers multiple deployment methods such as VM, container, or bare-metal setups.

  • Container Runtimes: Supports various container runtimes including CRI-O, containerd, and Docker.

  • Direct API Access: Provides a direct API endpoint for efficient image loading and building.

  • Advanced Features: Includes features like LoadBalancer, filesystem mounts, FeatureGates, and network policy support.

  • Add-ons: Offers add-ons for easily installing Kubernetes applications.

  • CI Environment Compatibility: Compatible with common Continuous Integration (CI) environments.


Task-01: Install Minikube on Your Local Machine

Begin by installing Minikube on your local machine. You can refer to the official Minikube documentation or explore alternative installation methods based on your preferences.

or else you can just copy paste if you are linux or ubuntu user:

# Update the package list and install Docker
sudo apt-get update
sudo apt-get install -y docker.io

# Add the current user to the Docker group
sudo usermod -aG docker $USER
newgrp docker

# Install dependencies required for Minikube
sudo apt-get install -y apt-transport-https curl conntrack

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

# Install Minikube
sudo install minikube-linux-amd64 /usr/local/bin/minikube

# Start Minikube
minikube start

# Verify Minikube installation
minikube version

Understanding Pods

In Kubernetes, pods serve as the foundational units of deployment. A pod represents one or more containers with shared storage and network resources. These containers are tightly coupled and run within the same context, making pods the smallest deployable units in Kubernetes.


Task-02: Create Your First Pod on Kubernetes with Minikube

Take the first step by creating a basic Nginx pod using Minikube. Alternatively, you can explore other creative options to enhance your learning experience. Below is a sample YAML file for creating a pod:

apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
spec:
  containers:
    - name: nginx-container
      image: nginx:latest
      ports:
        - containerPort: 80

If you encounter any challenges during the process, don't hesitate to consult the provided YAML file or seek guidance from the vibrant Kubernetes community.

Happy pod creation!๐Ÿ˜Š

0
Subscribe to my newsletter

Read articles from Yashraj Singh Sisodiya directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Yashraj Singh Sisodiya
Yashraj Singh Sisodiya

I am Yashraj Singh Sisodiya, a 3rd Year CSE student at SVVV, born and raised in Shujalpur. Currently residing in Indore, I'm passionate about pursuing a career in DevOps engineering. My tech journey began with an internship at Infobyte, honing my skills as an Android Developer intern. Alongside my academic pursuits, I actively participate in co-curriculars, holding roles as Technical Lead at Abhyudaya and Cloud Lead at GDSC SVVV, while also serving as an MLSA of my college. I have a keen interest in Cloud Computing, demonstrated through projects such as User management and Backup using shell scripting Linux, Dockerizing applications, CI/CD with Jenkins, and deploying a 3-tier application on AWS. Always eager to learn, I'm committed to expanding my knowledge and skills in the ever-evolving tech landscape.