Launching your First Kubernetes Cluster with Nginx running
Kubernetes Cluster with Nginx (Part-2)
We learned the architecture of one of the top most important tool "Kubernetes" in our previous task.
Let's read about minikube and implement k8s in our local machine
What is minikube?
Minikube, a robust tool, facilitates the creation of local Kubernetes clusters on macOS, Linux, and Windows. Its lightweight nature and user-friendly interface make it ideal for educational, testing, and developmental purposes within a Kubernetes environment. Whether as virtual machines, containers, or bare-metal setups, Minikube enables versatile deployment options, catering to various use cases.
Key Features of Minikube:
Latest Kubernetes Support: Always updated, Minikube supports the latest Kubernetes release and the six preceding minor versions.
Cross-Platform Compatibility: Seamlessly operational across Linux, macOS, and Windows operating systems.
Flexible Deployment Options: Offers the choice between deploying as a virtual machine, a container, or on bare-metal.
Container Runtimes: Supports multiple container runtimes, including CRI-O, containerd, and Docker, allowing flexibility in the container environment.
Direct API Endpoint: Ensures rapid image loading and building through a direct API endpoint, enriching the development process.
Advanced Features: Includes functionalities like LoadBalancer, filesystem mounts, FeatureGates, and network policies, delivering a comprehensive Kubernetes experience.
Addon Support: Simplifies the integration of additional functionalities by allowing easy installation of Kubernetes applications using its addon feature.
CI Environment Compatibility: Seamlessly integrates into common Continuous Integration (CI) environments, streamlining its inclusion into development pipelines.
Task-01: Install Minikube on Your Local Machine
To get started with Minikube, follow these simple steps:
Visit the https://minikube.sigs.k8s.io/docs/start/ for detailed instructions.
Alternatively, explore https://minikube.sigs.k8s.io/docs/start/
Now that Minikube is set up.
Understanding the Concept of Pods
Within the Kubernetes ecosystem, a Pod stands as the most compact deployable computing unit. These entities are crafted to encapsulate multiple containers, enabling shared storage and network resources. Each Pod encompasses a specification dictating the operational parameters for its enclosed containers. These containers coexist, are scheduled together, and operate within a unified context.
Task-02: Create your first pod on Kubernetes.
To install the latest minikube stable release on x86-64 Linux using binary download:
curl -LO storage.googleapis.com/minikube/releases/la.. sudo install minikube-linux-amd64 /usr/local/bin/minikube
Step 1: Install kubectl using the command
sudo snap install kubectl --classic / minikube start
Step 2: create pod.yaml file for nginx as below
Step 3: run a container on pod using the below command
Step 4: Validate container details using
kubectl get pods
We can also validate container details using
docker ps -a |grep 'nginx'
Thank You!!
Happy Learning !!