Day 31: Launching your First Kubernetes Cluster with Nginx running ???

Day 31: Launching your First Kubernetes Cluster with Nginx running ???

What is minikube?

Before, we discussed the many Kubernetes parts that go into creating a master and worker node, including the API server, etcd key-value store, controllers, and scheduler on the master, and kubelets and container runtime on the worker nodes. Setting up and installing these components on different systems individually would require a lot of time and work.

Minikube combines all these various parts into a single image and offers us a single-node Kubernetes cluster that is already configured, allowing us to get going quickly.

The entire program is bundled into an ISO image and may be downloaded online.

The functionality of minikube:

  • easy-to-install Kubernetes application add-ons
  • enables typical CI scenarios
  • Supports the most recent Kubernetes release (+6 previous minor versions)
  • Cross-platform (Linux, macOS, Windows)
  • Direct API endpoint for blazing fast image load and build

and many more.........

Task-01:

Installation of minikube

  • https://minikube.sigs.k8s.io/docs/start/ Visit for installation instructions
  • If you want to try an alternative way, you can check?this.

Steps:

Follow the official documentation of Kubernetes:

No alt text provided for this image

Here, I used the aforementioned two instructions to set up Minikube on Linux.

No alt text provided for this image

By launching a local Kubernetes cluster with the aforementioned command, you can verify that Minikube and the hypervisor were both successfully installed:

Using minikube Start, you can download Kubernetes.

minikube start --driver=<driver_name>        

In the below image, we used driver_name=docker, so first, you need to install Docker on your machine.

No alt text provided for this image

Once?minikube start?finishes, run the command below to check the status of the cluster:

minikube status        
No alt text provided for this image

You need to clear the local state of Minikube if you previously installed it, ran minikube start, and got the message "machine does not exist."

minikube delete

Use the command minikube ssh to log in to Minikube.

Pod:

Pods are the smallest deployable units of computing that you can create and manage in Kubernetes.

A pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources and a specification for how to run the containers. A Pod's contents are always co-located, co-scheduled, and run in a shared context. A Pod models an application-specific "logical host": it contains one or more application containers that are relatively tightly coupled.

Task-02:

Create your first pod on Kubernetes through minikube.

Install kubectl using the command

sudo snap install kubectl --classic        
No alt text provided for this image

  • ?create pod.yaml file for nginx.

No alt text provided for this image

To create a pod using pod.yaml file use below command:

kubectl apply -f <pod.yaml>        
No alt text provided for this image

To check list of pods:

kubectl get pods        

You can verify that an active nginx container has been created.

No alt text provided for this image

I'll attempt to become more in-depth with K8s over time, but for now, thanks for your time, and good luck with your studies! ????

要查看或添加评论,请登录

Vinay Kumar的更多文章

  • DevOps Project - 4 ????

    DevOps Project - 4 ????

    Project Description The project aims to deploy a web application using Docker Swarm, a container orchestration tool…

    7 条评论
  • DevOps Project 3 ????

    DevOps Project 3 ????

    Project Description The project involves hosting a static website using an AWS S3 bucket. Amazon S3 is an object…

    3 条评论
  • DevOps Project -2 ????

    DevOps Project -2 ????

    Project Description The project is about automating the deployment process of a web application using Jenkins and its…

  • Day 80: DevOps Project 1 ????

    Day 80: DevOps Project 1 ????

    Project Description The project aims to automate the building, testing, and deployment process of a web application…

    2 条评论
  • Day 73 - Setup Grafana on AWS EC2 Instance ????

    Day 73 - Setup Grafana on AWS EC2 Instance ????

    Task: Set up grafana in your local environment on AWS EC2. Go to the AWS console and Launch an EC2 instance To enable…

  • Day 72 - Grafana ????

    Day 72 - Grafana ????

    What is Grafana? No matter where your metrics are kept, Grafana is an open-source data visualization and monitoring…

    4 条评论
  • Day71 - Terraform Interview Questions ????

    Day71 - Terraform Interview Questions ????

    1. What is Terraform and how it is different from other IaaC tools? HashiCorp's Terraform is an Infrastructure as Code…

  • Day 70 - Terraform Modules ????

    Day 70 - Terraform Modules ????

    Modules are containers for multiple resources that are used together. A module consists of a collection of .

    4 条评论
  • Day 69 - Meta-Arguments in Terraform ???

    Day 69 - Meta-Arguments in Terraform ???

    When you define a resource block in Terraform, by default, this specifies one resource that will be created. To manage…

    4 条评论
  • Day 65 - Terraform Resources ????

    Day 65 - Terraform Resources ????

    Understanding Terraform Resources A resource in Terraform represents a component of your infrastructure, such as a…

    2 条评论

社区洞察

其他会员也浏览了