TABLE OF CONTENTS
Minikube
It is considered a local Kubernetes which makes it easy to use all K8s applications on your VMs. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete.
Features of Minikube
Supports the latest Kubernetes release (+6 previous minor versions)
Cross-platform (Linux, macOS, Windows)
Deploy as a VM, a container, or on bare-metal
Multiple container runtimes (CRI-O, containers, docker)
Direct API endpoint for blazing-fast image load and build.
Advanced features such as LoadBalancer, filesystem mounts, FeatureGates, and network policy.
Addons for easily installed Kubernetes applications.
Supports common CI environments**.**
Task-01: Install Minikube on your local
Create an EC2 instance with t2.medium configuration as the minimum CPU required for Kubernetes to run is 2.
Login to the server and then install Docker.
Navigate to the Minikube installation page and select the required settings for installing on a Linux machine.
Use the below command to install minikube.
COPY
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube
Now start the minikube and make sure to set the driver as Docker.
Now install kubectl in your system and check the configuration.
POD
POD is the smallest deployable unit that you can create and manage in Kubernetes. A POD is a collection of one or more containers that share the same network, storage configuration and specification. A Pod is similar to a set of containers with shared namespaces and shared filesystem volumes.
Pods also provide environmental dependencies, including storage that is permanent and available to all pods in the cluster and configuration data needed to run the containers within the pod.
Benefits of using a POD
POD contains one or more containers, so it becomes easy to communicate and share data among them using their IP addresses.
Pods simplify scalability, enabling replica pods to be created and shut down automatically based on changes in demand.
The syntax for creating a POD
- containerPort: <port with which container to be mapped>
Task-02: Create your first pod on Kubernetes through Minikube
Let's pull a Reddit-clone image that we had already pushed as a part of my project a few days back. This image is there in my DockerHub repository.
Write the pod.yml file with the proper syntax.
Run the pod.yml file by using the below command.
COPY
kubectl apply -f <yaml file name>
Check if the POD is running.
Thanks for reading my article. Have a nice day.
WRITTEN BY Biswaraj Sahoo --AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes
Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333