Day 31 Task: Launching your First Kubernetes Cluster with Nginx running.
Maninder Singh
AWS || Networking || Docker || Mentor & Tutor || System Engineer Antier Solution
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.
For Installation,you can Visit the offical website of minikube this page.
Steps:
Install the minikube on Linux,for installation minikube site.
Here we above used 2 commands for installing minikube on Linux.
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
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.
Once?minikube start?finishes, run the command below to check the status of the cluster:
领英推荐
If you have previously installed Minikube, and run:
Syntax:- minikube start
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
Create a folder, inside folder create pod.yaml file for nginx.
To create a pod using pod.yaml file use below command:
Syntax: kubectl apply -f <pod.yaml>
To check list of pods:
Syntax:- kubectl get pods
Thank you for reading!! I hope you find this article helpful!!
Happy Learning!!
Next Topic:
Day 32 Task: Launching your Kubernetes Cluster with Deployment.
?? 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