Pre-requisites:
Below are essentials before you start deploying containers into kubernetes cluster
- Installdocker
- InstallVirtual Box (Type II Hypervisor)
- InstallMinikube (Kubernetes on local)
Verify Docker & Minikube installed correctly:
- To verify docker type "docker" in powershell and see if you get below options.
PS C:\WINDOWS\system32> docker
PS C:\WINDOWS\system32> dockerUsage: docker [OPTIONS] COMMANDA self-sufficient runtime for containersOptions: --config string Location of client config files (default "C:\\Users\\Jasper\\.docker") -c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
- To verify Minikube, type "minikube" in powershell and see if you get below options.
PS C:\WINDOWS\system32> minikube
PS C:\WINDOWS\system32> minikubeminikube provisions and manages local Kubernetes clusters optimized for development workflows.Basic Commands: start Starts a local Kubernetes cluster status Gets the status of a local Kubernetes cluster stop Stops a running local Kubernetes cluster delete Deletes a local Kubernetes cluster
Step 1: Create Kubernetes cluster
1.create Mikikubecluster on VirtualBox VM
minikube start --driver=virtualbox
2.Get cluster information
PS C:\WINDOWS\system32> kubectl cluster-infoKubernetes control plane is running at https://192.168.XX.XXX:8443CoreDNS is running at https://192.168.XX.XXX:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxyTo further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
3.get nodes
PS C:\WINDOWS\system32> kubectl get nodesNAME STATUS ROLES AGE VERSIONminikube Ready control-plane 13m v1.27.4
4.get namespaces
PS C:\WINDOWS\system32> kubectl get namespacesNAME STATUS AGEdefault Active 14mkube-node-lease Active 14mkube-public Active 14mkube-system Active 14m
5.get All pods
PS C:\WINDOWS\system32> kubectl get pods -ANAMESPACE NAME READY STATUS RESTARTS AGEkube-system coredns-5d78c9869d-df2qj 1/1 Running 0 14mkube-system etcd-minikube 1/1 Running 0 14mkube-system kube-apiserver-minikube 1/1 Running 0 14mkube-system kube-controller-manager-minikube 1/1 Running 0 14mkube-system kube-proxy-8zw65 1/1 Running 0 14mkube-system kube-scheduler-minikube 1/1 Running 0 14mkube-system storage-provisioner 1/1 Running 1 (13m ago) 14m
Top comments(0)
Subscribe
For further actions, you may consider blocking this person and/orreporting abuse