Day 31 Task: Launching your First Kubernetes Cluster with Nginx running.

Day 31 Task: Launching your First Kubernetes Cluster with Nginx running.

In Today's we will discuss how to Launch the first Kubernetes cluster with the help of Nginx.

Firstly let us know some Definitions related to this article.

What is Minikube?

Minikube is a tool which quickly set up a local kubernetes cluster on Linux,Windows & macOS. It can be deploy as a VM container or a bare-mental.

It is a pared down version of Kubernetes that gives you all the benefits of kubernetes with a lot less efforts.

Some Important Features of Minikube:

(a) It supports the latest kubernetes release (6 previous versions).

(b) Cross-platform (Linux,mac OS,Windows).

(c) Deploy as a VM,a container,or a bare-mental.

(d) Run times multiple containers (docker,container)

(e) Direct API endpoint for blazing fast image load and build.

(f) Advanced features such as a Load Balancer,Filesystems mounts, FeatureGates, and network policy.

(g) Addons for easily installed kubernetes applications.

(h) Supports common CI Environments.

Discuss with the help of 2 Tasks:

Task-01:

Install minikube on your local or AWS Instance, I will use the EC2 instance.

No alt text provided for this image
will use the EC2 instance. Diagram,

For Installation,you can Visit the offical website of minikube this page.

Steps:

Install the minikube on Linux,for installation minikube site.

No alt text provided for this image
Install the minikube on Linux,for installation minikube site.

Here we above used 2 commands for installing minikube on Linux.

No alt text provided for this image
history Commands

For running the minikube you need to install the docker, docker permissions.

Syntax:-

Sudo apt install docker.io -y

sudo usermod -aG sudo docker $USER && newgrp docker

No alt text provided for this image
sudo usermod -aG sudo docker $USER && newgrp docker
No alt text provided for this image
sudo usermod -aG sudo docker $USER && newgrp docker

To confirm successful installation of both hypervisor and Minikube,you can run the following commands to start up a local kubernetes cluster:

Syntax:- minikube start -it will downloads Kubernetes for you.

No alt text provided for this image
minikube start -it will downloads Kubernetes for you. Diagram.

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

No alt text provided for this image
Minikube Status Commands Diagram.

If you have previously installed Minikube, and run:

Syntax:- minikube start

No alt text provided for this image
minikube start Diagram.

and minikube start returned an error

Syntax:- machine does not exist.

Then you delete need to clear minikube local state.

Syntax: minikube delete

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 and co-scheduled, and run in a shared context. A Pod models an application-specific "logical host": it contains one or more application containers which are relatively tightly coupled.

Task-02:

Create your first pod on Kubernetes through minikube.

Firstly install the kubectl using command:

Syntax: sudo snap install kubectl --classic

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

Create a folder, inside folder create pod.yaml file for nginx.

No alt text provided for this image
Create a folder, inside folder create pod.yaml file for nginx. Diagram.

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

Syntax: kubectl apply -f <pod.yaml>

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

To check list of pods:

Syntax:- kubectl get pods

No alt text provided for this image
kubectl get pods Digram.


Thank you for reading!! I hope you find this article helpful!!

Happy Learning!!


Next Topic:

Day 32 Task: Launching your Kubernetes Cluster with Deployment.






Akansha Waghole

?? 2x Redhat Certified || Google Certified || Cloud Engineer | Openshift | Kubernetes | Docker | Git & GitHub | Podman | AWS | Redhat Linux || Python || Java || C/C++ || ML | CNN

1 年

Thank you for sharing

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

Maninder Singh的更多文章

  • Artificial Intelligence for DevOps Engineer

    Artificial Intelligence for DevOps Engineer

    Dear learners, In today article we will explain the Artificial Intelligence for the DevOps Engineers. Important Aspects…

    12 条评论
  • Bash Shell Scripting:- Lesson 7,8 &9 for DevOps Engineers.

    Bash Shell Scripting:- Lesson 7,8 &9 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 条评论
  • Bash Shell Scripting:- Lesson 4,5 &6 for DevOps Engineers.

    Bash Shell Scripting:- Lesson 4,5 &6 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 条评论
  • Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

    Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 条评论
  • EP 2 DevOps:- 2 Tier Application Deployment

    EP 2 DevOps:- 2 Tier Application Deployment

    2-Tier Application Deployment Diagram (Architecture) Dear Learners in today topic we will deploy a 2 Tier Application…

    8 条评论
  • DevOps Engineers:- Docker Cheat Sheet

    DevOps Engineers:- Docker Cheat Sheet

    Dear learner, presented below is a concise yet comprehensive Docker cheat sheet, complete with detailed commands and…

    7 条评论
  • DevOps (Day-90): Ending the challengs

    DevOps (Day-90): Ending the challengs

    Table of Contents: Flashback Self-Impact of Learning Today, We have completed the 90days of DevOps challenge where we…

    16 条评论
  • DevOps (Day-88): Kubernetes Architecture

    DevOps (Day-88): Kubernetes Architecture

    Dear Learner's in today topic we will discuss the Kubernetes Architecture in detail. Table of Contents Kubernetes…

    1 条评论
  • DevOps (Day-87): Argo CD

    DevOps (Day-87): Argo CD

    Dear Learners in today topic we will the discuss the Argo CD in Kubernetes. Table of Contents Challenges with CD into…

    13 条评论
  • DevOps (Day-86): Project-7 Portfolio App

    DevOps (Day-86): Project-7 Portfolio App

    Dear Learners in Today's article we will deploying a Portfolio app on AWS S3 Bucket using GitHub. Table of Contents:…

    10 条评论

社区洞察

其他会员也浏览了