Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Jasper Rodda
Jasper Rodda

Posted on

     

Deploy pods on Kubernetes Cluster in localhost

Pre-requisites:

Below are essentials before you start deploying containers into kubernetes cluster

  1. Installdocker
  2. InstallVirtual Box (Type II Hypervisor)
  3. InstallMinikube (Kubernetes on local)

Verify Docker & Minikube installed correctly:

  1. 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")
Enter fullscreen modeExit fullscreen mode
  1. 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
Enter fullscreen modeExit fullscreen mode

Step 1: Create Kubernetes cluster

1.create Mikikubecluster on VirtualBox VM

minikube start --driver=virtualbox
Enter fullscreen modeExit fullscreen mode

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'.
Enter fullscreen modeExit fullscreen mode

3.get nodes

PS C:\WINDOWS\system32> kubectl get nodesNAME       STATUS   ROLES           AGE   VERSIONminikube   Ready    control-plane   13m   v1.27.4
Enter fullscreen modeExit fullscreen mode

4.get namespaces

PS C:\WINDOWS\system32> kubectl get namespacesNAME              STATUS   AGEdefault           Active   14mkube-node-lease   Active   14mkube-public       Active   14mkube-system       Active   14m
Enter fullscreen modeExit fullscreen mode

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
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Hey reader, Welcome to my Blog! I am a Cloud DevOps Engineer; I write about configuring & deploying applications on cloud computing platform with focus on CI/CD and DevOps best practices.
  • Location
    Dallas,TX
  • Joined

More fromJasper Rodda

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp