Kubernetes - POD, Steps Installing Minikube, Kubectl and writing our first pod.yml file.

Kubernetes - POD, Steps Installing Minikube, Kubectl and writing our first pod.yml file.

  1. What is POD?

    A pod in kubernetes is a runtime specification of a container in docker. A pod provides more declerative way of defining using YAML and you can run more than one container in a pod.

    In k8's lowest level of deployment is a POD.

  2. What is Minikube?

Minikube is a lightweight Kubernetes (K8) installation, which can create a Virtual Machine (VM) on your local machine or in a cloud instance, which deploys a simple cluster containing only one node.

  1. What is Kubectl?

    As in docker we have docker CLI, sameway in k8s we have kubectl, a CLI tool for k8s to directly interact with k8s clusters.

  2. Steps to install the requirements and deploying our app:

    Step 1: Create an AWS EC2 instance with Ubuntu 22

    Create an EC2 instance with Ubuntu 22.04 (the latest for the moment) operating system.

    Instance Size: t2.large with 2 CPUs, 32 GB Storage

    Step 2 : Install Docker

    Install Docker on the Ubuntu EC2 instance created under Step 1.

    Step 3 : Install Kubectl

    Step 4: Install Minikube

    Once both Docker and Kubectl are installed, you may use following set of commands to install Minikube.

    curl -LO storage.googleapis.com/minikube/releases/la..

    sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64

    Step 5: Start Minikube

    Use the following command to start Minikube

    $ minikube start

    $ minikube status

Step 6: Writing our first pod.yml file for nginx.

To check pods are running:

kubectl get pods // kubectl get pods -o wide

Step 7: To see running the image nginx:1.14.2

minikube ssh && curl <ip address of your pod>

    1. Minikube: https://minikube.sigs.k8s.io/docs/

    2. Installing Docker on Ubuntu 22.04 : https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04

    3. Installing Kubectl on Linux: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/

    4. Installing Minikube: https://minikube.sigs.k8s.io/docs/start /

    5. Kubernetes Pod Doc: https://kubernetes.io/docs/concepts/workloads/pods/