What is minikube?
Ans:- Minikube is a tool which quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. It can deploy as a VM, a container, or on bare-metal.
Minikube is a pared-down version of Kubernetes that gives you all the benefits of Kubernetes with a lot less effort.
This makes it an interesting option for users who are new to containers, and also for projects in the world of edge computing and the Internet of Things.
- Features of minikube..
(a) Supports the latest Kubernetes release (+6 previous minor versions)
(b) Cross-platform (Linux, macOS, Windows)
(c) Deploy as a VM, a container, or on bare-metal
(d) Multiple container runtimes (CRI-O, containerd, docker)
(e) Direct API endpoint for blazing fast image load and build
(f) Advanced features such as LoadBalancer, filesystem mounts, FeatureGates, and network policy
(g) Addons for easily installed Kubernetes applications
(h) Supports common CI environments
Lets begin with pods:
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-01:
Install minikube on your local
for installation please visit:https://minikube.sigs.k8s.io/docs/start/
Visit this webiste and select respetive os.
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start
So when you give above command it will throw below error as it needs driver to run i.e.docker so need to install docker
Visit this site:https://docs.docker.com/engine/install/ubuntu/
Update the
apt
package index and install packages to allowapt
to use a repository over HTTPS:$ sudo apt-get update $ sudo apt-get install \ ca-certificates \ curl \ gnupg
Add Docker’s official GPG key:
$ sudo install -m 0755 -d /etc/apt/keyrings $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg $ sudo chmod a+r /etc/apt/keyrings/docker.gpg
Use the following command to set up the repository:
$ echo \ "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker Engine
Update the
apt
package index:$ sudo apt-get update
Install Docker Engine, containerd, and Docker Compose.
Latest
Specific version
To install the latest version, run:
docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo snap install kubectl
sudo snap install kubectl --classic
kubectl get po -A
minikube status
kubectl get node
Here is MINIKUBE:
Task-02:
Create your first pod on Kubernetes through minikube.
- NGINX pod creation on Minikube:
Create pod.yml for NGINX
Note: | # After creating this file , run below command: |
# kubectl apply -f <yaml file name> |
Troubleshootings/errors:
if minikube start --driver=docker command is not working issue minikube start --force
If this error occurs exit and login back with root user sudo -i
Minikube installations/Github:https://github.com/gsbarure/kubeadm.git
Linkdin:https://www.linkedin.com/in/gajanan-barure-7351a4140
***Happy Learning :)***✌✌
Keep learning,Keep growing🎇🎇
Thank you for reading!! Hope you find this helpful.
#day31#90daysofdevops#devopscommunity#