Skip to main content

Command Palette

Search for a command to run...

๐ŸŽ‡Day 31 : Launching your First Kubernetes Cluster with Nginx running

Updated
โ€ข3 min read
๐ŸŽ‡Day 31 : Launching your First Kubernetes Cluster with Nginx running
P

Hey there! ๐Ÿ‘‹

I'm Pratik R. Mandge, a DevOps Engineer passionate about all things AWS DevOps Technology. Currently on a learning adventure, I'm here to share my journey and Blog's in the world of cloud and DevOps.

๐Ÿ› ๏ธ My focus? Making sense of AWS services, improving CI/CD, and diving into infrastructure as code. Whether you're fellow interns or curious enthusiasts, let's grow together in the vibrant DevOps space.

๐ŸŒ Connect with me for friendly chats, shared experiences, and learning moments. Here's to embracing the learning curve and thriving in the exciting world of AWS DevOps Technology!

Follow me on LinkedIn: https://www.linkedin.com/in/pratik-mandge363

๐ŸŽกWhat is Minikube?

Minikube is a tool that enables you to run Kubernetes locally on your machine. It creates a single-node Kubernetes cluster on your local computer, allowing you to develop and test Kubernetes applications without needing to set up a full-scale cluster. Minikube is great for learning Kubernetes, testing deployments, and developing applications that will eventually be deployed on a larger Kubernetes cluster.

๐ŸŽกFeatures of Minikube

Minikube offers several key features that make it a valuable tool for developers and Kubernetes enthusiasts:

  1. Local Kubernetes Cluster: Minikube allows you to run a single-node Kubernetes cluster on your local machine, enabling you to develop and test Kubernetes applications in a local environment.

  2. Easy Setup: Minikube is easy to set up and can be installed on various operating systems, including Linux, macOS, and Windows, with minimal dependencies.

  3. Isolation: Minikube provides an isolated Kubernetes environment, allowing you to experiment with Kubernetes features without affecting your production environment.

  4. Resource Management: Minikube allows you to specify resource constraints, such as CPU and memory limits, for the Kubernetes cluster, making it suitable for testing resource-intensive applications.

  5. Add-ons: Minikube supports various add-ons, such as Kubernetes Dashboard, Heapster, and others, to enhance your Kubernetes experience.

  6. Kubernetes Version Support: Minikube supports running different versions of Kubernetes, allowing you to test your applications against specific Kubernetes versions.

  7. Integration with Docker: Minikube seamlessly integrates with Docker, allowing you to build and deploy Docker containers on the Minikube Kubernetes cluster.

  8. Networking: Minikube provides networking features that allow your Kubernetes pods to communicate with each other and with the outside world.

  9. Storage: Minikube supports various storage options, such as local storage, hostPath, and NFS, for storing data in your Kubernetes applications.

Generally, Minikube is a powerful tool for learning, testing, and developing Kubernetes applications in a local environment.

๐ŸŽกPre-requisites

โ™ฆ๏ธUbuntu / AWS EC2 instance with t2.medium type or above.

โ™ฆ๏ธkubectl

โ™ฆ๏ธDocker

โ™ฆ๏ธInternet Access

๐Ÿ› Task : Install minikube on your local & Create your first pod on Kubernetes through minikube.

๐Ÿ–ŒUpdate your system packages

sudo apt-get update

๐Ÿ–ŒInstall Curl Package

sudo apt install -y curl wget apt-transport-https

๐Ÿ–ŒInstall the Docker

sudo apt install -y docker.io

๐Ÿ–ŒStart and Enable Docker

sudo systemctl enable docker

๐Ÿ–ŒAdd the current user to the docker group (To use docker without root)

sudo usermod -aG docker $USER && newgrp docker

๐Ÿ–ŒThen Once Reboot your system

sudo reboot

๐Ÿ–ŒTo Check Current user add to Docker Group

cat /etc/group

โœ’๏ธNow, Install Minikube

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

Make it executable and move it into your path:

chmod +x minikube
sudo mv minikube /usr/local/bin/

โœ’๏ธInstall the Kubectl

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

๐Ÿ–ŒMake it executable and move it into your path:

chmod +x kubectl
sudo mv kubectl /usr/local/bin/

๐Ÿ–ŒThen, Start the Minikube

minikube start --driver=docker

๐Ÿ–ŒCheck Your minikube status

minikube status

โœ’๏ธThen, make nginx-pod.yaml file

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

๐Ÿ–ŒThen run nginx-pod

kubectl apply -f nginx-pod.yaml

๐Ÿ–ŒCheck pod is in running state

kubectl get pods

๐Ÿ–ŒFor delete the pod

kubectl delete pod nginx-pod

๐Ÿ–ŒWhen you are done, you can stop the Minikube cluster

minikube stop

๐Ÿ–ŒTo delete minikube cluster

minikube delete

I think this blog will be quite valuable, offering unique viewpoints and introducing new and engaging ideas. ๐Ÿ™

๐Ÿ˜Š Happy learning!

Kubernetes - Basic to Advanced

Part 2 of 3

Explore Kubernetes architecture, deployment, scaling, and management in our comprehensive series. Learn to deploy and manage containerized applications effectively.

Up next

๐ŸŽ‡Day 30 : Demystifying Kubernetes Architecture: A Comprehensive Guide

"Efficient Container Orchestration for Modern Applications"

More from this blog

๐Ÿš€ ๐——๐—ฎ๐˜† ๐Ÿญ ๐—ผ๐—ณ ๐— ๐˜† ๐Ÿณ-๐——๐—ฎ๐˜† ๐—”๐—ช๐—ฆ ๐—–๐—ต๐—ฎ๐—น๐—น๐—ฒ๐—ป๐—ด๐—ฒ ๐ŸŒŸ

Today, I kicked off my AWS Challenge with a deep dive into several fundamental concepts. Hereโ€™s what I covered: ๐Ÿท๏ธ ๐˜ผ๐™’๐™Ž ๐™‹๐™ง๐™ž๐™˜๐™ž๐™ฃ๐™œ ๐™ˆ๐™ค๐™™๐™š๐™ก๐™จ:AWS offers various pricing models to cater to different business needs: ๐Ÿญ) ๐—ข๐—ป-๐——๐—ฒ๐—บ๐—ฎ๐—ป๐—ฑ ๐—œ๐—ป...

May 22, 20242 min read
๐Ÿš€ ๐——๐—ฎ๐˜† ๐Ÿญ ๐—ผ๐—ณ ๐— ๐˜† ๐Ÿณ-๐——๐—ฎ๐˜† ๐—”๐—ช๐—ฆ ๐—–๐—ต๐—ฎ๐—น๐—น๐—ฒ๐—ป๐—ด๐—ฒ ๐ŸŒŸ

๐ŸŒŸ ๐—˜๐˜…๐—ฝ๐—น๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ ๐—ž๐—ฒ๐˜† ๐—–๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜๐˜€ ๐—ผ๐—ณ ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ ! ๐ŸŒŸ

Kubernetes is designed to automate the deployment, scaling, and operation of application containers. The architecture is divided into two main components: ๐™ˆ๐™–๐™จ๐™ฉ๐™š๐™ง and ๐™’๐™ค๐™ง๐™ ๐™š๐™ง. Hereโ€™s a detailed breakdown: ๐Ÿ”ถ๐™ˆ๐™–๐™จ๐™ฉ๐™š๐™ง ๐™‰๐™ค๐™™๐™š ๐˜พ๐™ค๐™ข๐™ฅ๐™ค๏ฟฝ...

May 19, 20242 min read
๐ŸŒŸ ๐—˜๐˜…๐—ฝ๐—น๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ ๐—ž๐—ฒ๐˜† ๐—–๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜๐˜€ ๐—ผ๐—ณ ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ ! ๐ŸŒŸ

โ›…๏ธImportant AWS Services: Part - 3

๐Ÿš€๐™€๐™ญ๐™˜๐™ž๐™ฉ๐™š๐™™ ๐™ฉ๐™ค ๐™จ๐™๐™–๐™ง๐™š ๐™ข๐™ฎ ๐™š๐™ญ๐™ฅ๐™š๐™ง๐™ฉ๐™ž๐™จ๐™š ๐™ž๐™ฃ ๐˜ผ๐™’๐™Ž ๐™ฌ๐™ž๐™ฉ๐™ ๐™– ๐™›๐™ค๐™˜๐™ช๐™จ ๐™ค๐™ฃ ๐™˜๐™ค๐™ฃ๐™ฉ๐™–๐™ž๐™ฃ๐™š๐™ง๐™ž๐™ฏ๐™–๐™ฉ๐™ž๐™ค๐™ฃ ๐™–๐™ฃ๐™™ ๐™™๐™š๐™ฅ๐™ก๐™ค๐™ฎ โ–ถ๏ธ๐—”๐—บ๐—ฎ๐˜‡๐—ผ๐—ป ๐—˜๐—น๐—ฎ๐˜€๐˜๐—ถ๐—ฐ ๐—ž๐˜‚๐—ฏ๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜๐—ฒ๐˜€ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ (๐—˜๐—ž๐—ฆ): โ–ช๏ธFully managed Kuberne...

May 12, 20242 min read
โ›…๏ธImportant AWS Services: Part - 3

โ›…๏ธImportant AWS Services: Part - 2

โšœ๏ธ๐™„๐™ข๐™ฅ๐™ค๐™ง๐™ฉ๐™–๐™ฃ๐™ฉ ๐™ฌ๐™ž๐™™๐™š ๐™ง๐™–๐™ฃ๐™œ๐™š ๐™ค๐™› ๐˜ผ๐™’๐™Ž ๐™จ๐™š๐™ง๐™ซ๐™ž๐™˜๐™š๐™จ ๐™ฉ๐™๐™–๐™ฉ ๐™˜๐™–๐™ฃ ๐™š๐™ฃ๐™–๐™—๐™ก๐™š ๐™ฉ๐™ค ๐™–๐™ง๐™˜๐™๐™ž๐™ฉ๐™š๐™˜๐™ฉ ๐™จ๐™˜๐™–๐™ก๐™–๐™—๐™ก๐™š, ๐™จ๐™š๐™˜๐™ช๐™ง๐™š, ๐™–๐™ฃ๐™™ ๐™š๐™›๐™›๐™ž๐™˜๐™ž๐™š๐™ฃ๐™ฉ ๐™˜๐™ก๐™ค๐™ช๐™™ ๐™จ๐™ค๐™ก๐™ช๐™ฉ๐™ž๐™ค๐™ฃ๐™จ. ๐™ƒ๐™š๐™ง๐™š ๐™–๐™ง๐™š ๐™จ๐™ค๐™ข๐™š ๐™ ๐™š๐™ฎ ๐™จ๐™š๐™ง...

May 10, 20243 min read
โ›…๏ธImportant AWS Services: Part - 2

PratikM's Blog

49 posts