{"id":47844710,"url":"https://github.com/ajaychinthapalli/setup-kubernetes","last_synced_at":"2026-04-03T21:08:23.960Z","repository":{"id":64685137,"uuid":"577414964","full_name":"ajaychinthapalli/setup-kubernetes","owner":"ajaychinthapalli","description":"Local kubernetes setup on macOS with minikube on VirtualBox and local Docker registry","archived":false,"fork":false,"pushed_at":"2026-02-02T21:55:04.000Z","size":873,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T11:09:02.843Z","etag":null,"topics":["dockerfile","github-actions","html","k8s","macos","minikube","png","yaml"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajaychinthapalli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2022-12-12T17:26:16.000Z","updated_at":"2022-12-23T05:51:19.000Z","dependencies_parsed_at":"2023-01-30T17:45:49.709Z","dependency_job_id":null,"html_url":"https://github.com/ajaychinthapalli/setup-kubernetes","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ajaychinthapalli/setup-kubernetes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaychinthapalli%2Fsetup-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaychinthapalli%2Fsetup-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaychinthapalli%2Fsetup-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaychinthapalli%2Fsetup-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajaychinthapalli","download_url":"https://codeload.github.com/ajaychinthapalli/setup-kubernetes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaychinthapalli%2Fsetup-kubernetes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31377577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dockerfile","github-actions","html","k8s","macos","minikube","png","yaml"],"created_at":"2026-04-03T21:08:23.316Z","updated_at":"2026-04-03T21:08:23.935Z","avatar_url":"https://github.com/ajaychinthapalli.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Setup Kubernetes](https://github.com/ajaychinthapalli/setup-kubernetes/actions/workflows/start-kubernetes.yaml/badge.svg?branch=main)](https://github.com/ajaychinthapalli/setup-kubernetes/actions/workflows/start-kubernetes.yaml)[![Kubernetes Configuration Options](https://github.com/ajaychinthapalli/setup-kubernetes/actions/workflows/config-options.yaml/badge.svg)](https://github.com/ajaychinthapalli/setup-kubernetes/actions/workflows/config-options.yaml)\n[![Kubernetes Build \u0026 Deploy](https://github.com/ajaychinthapalli/setup-kubernetes/actions/workflows/build-deploy.yaml/badge.svg)](https://github.com/ajaychinthapalli/setup-kubernetes/actions/workflows/build-deploy.yaml)\n# About My Mac (macOS High Sierra 10.13.6)\n```text\nModel Name           :\tMacBook Pro\nModel Identifier     :\tMacBookPro14,2\nProcessor Name       :\tIntel Core i5\nProcessor Speed      :\t3.1 GHz\nNumber of Processors :\t1\nTotal Number of Cores:\t2\nL2 Cache (per Core)  :\t256 KB\nL3 Cache             :\t4 MB\nMemory               :\t8 GB\n```\n# Requirements\nMinikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:\n```text\nsysctl -a | grep machdep.cpu.features | grep VMX\n```\nIf there's output, you're good!\n```text\nbash-5.2$ sysctl -a | grep machdep.cpu.features | grep VMX\nmachdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C\n```\n\n# Prerequisites\n- kubectl\n- docker\n- minikube\n- virtualbox\n```text\nbrew update\nbrew install kubectl\nbrew install --cask docker virtualbox\nbrew install minikube\n```\n\n# Verification\n```text\nbash-5.2$ docker --version\nDocker version 19.03.13, build 4484c46d9d\nbash-5.2$ docker-compose --version\ndocker-compose version 1.27.4, build 40524192\nbash-5.2$ minikube version\nminikube version: v1.27.1\ncommit: fe869b5d4da11ba318eb84a3ac00f336411de7ba\nbash-5.2$ kubectl version --client\nWARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.\nClient Version: version.Info{Major:\"1\", Minor:\"25\", GitVersion:\"v1.25.3\", GitCommit:\"434bfd82814af038ad94d62ebe59b133fcb50506\", GitTreeState:\"clean\", BuildDate:\"2022-10-12T10:47:25Z\", GoVersion:\"go1.19.2\", Compiler:\"gc\", Platform:\"darwin/amd64\"}\nKustomize Version: v4.5.7\n```\n\n# Start\n```text\nminikube start\n```\nIt will take a while, expected output:\n```text\nbash-5.2$ minikube start\n😄  minikube v1.27.1 on Darwin 10.13.6\n🎉  minikube 1.28.0 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.28.0\n💡  To disable this notice, run: 'minikube config set WantUpdateNotification false'\n\n✨  Automatically selected the docker driver. Other choices: hyperkit, ssh\n💨  For improved Docker Desktop performance, Upgrade Docker Desktop to a newer version (Minimum recommended version is 20.10.0, minimum supported version is 18.09.0, current version is 19.03.13)\n📌  Using Docker Desktop driver with root privileges\n👍  Starting control plane node minikube in cluster minikube\n🚜  Pulling base image ...\n💾  Downloading Kubernetes v1.25.2 preload ...\n    \u003e preloaded-images-k8s-v18-v1...:  385.41 MiB / 385.41 MiB  100.00% 15.09 M\n    \u003e gcr.io/k8s-minikube/kicbase:  387.11 MiB / 387.11 MiB  100.00% 8.39 MiB p\n    \u003e gcr.io/k8s-minikube/kicbase:  0 B [________________________] ?% ? p/s 53s\n🔥  Creating docker container (CPUs=2, Memory=1987MB) ...\n🐳  Preparing Kubernetes v1.25.2 on Docker 20.10.18 ...\n    ▪ Generating certificates and keys ...\n    ▪ Booting up control plane ...\n    ▪ Configuring RBAC rules ...\n🔎  Verifying Kubernetes components...\n    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5\n🌟  Enabled addons: storage-provisioner, default-storageclass\n🏄  Done! kubectl is now configured to use \"minikube\" cluster and \"default\" namespace by default\n```\nGreat! You now have a running Kubernetes cluster locally. Minikube started a virtual machine for you, and a Kubernetes cluster is now running in that VM.\n\n# Check k8s\n```text\nbash-5.2$ kubectl get nodes\nNAME       STATUS   ROLES           AGE     VERSION\nminikube   Ready    control-plane   3m19s   v1.25.2\n```\n\n# Use minikube's built-in docker daemon:\n```text\neval $(minikube docker-env)\n```\nAdd this line to `.bash_profile` or `.zshrc` or ... if you want to use minikube's daemon by default (or if you do not want to set this every time you open a new terminal).\n\nYou can revert back to the host docker daemon by running:\n```text\neval $(docker-machine env -u)\n```\nIf you now run `docker ps`, it should now output something like:\n```text\nbash-5.2$ docker ps\nCONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS               NAMES\nc7b879609c60        6e38f40d628d           \"/storage-provisioner\"   7 minutes ago       Up 7 minutes                            k8s_storage-provisioner_storage-provisioner_kube-system_c410ca2c-cecf-410d-bb13-38e969048f92_0\ncfa5f44183de        5185b96f0bec           \"/coredns -conf /etc…\"   7 minutes ago       Up 7 minutes                            k8s_coredns_coredns-565d847f94-zr6pd_kube-system_f28ff7fa-8899-4860-bdb5-6229fa339304_0\n60ba3882a370        k8s.gcr.io/pause:3.6   \"/pause\"                 7 minutes ago       Up 7 minutes                            k8s_POD_storage-provisioner_kube-system_c410ca2c-cecf-410d-bb13-38e969048f92_0\n328aad89849c        1c7d8c51823b           \"/usr/local/bin/kube…\"   7 minutes ago       Up 7 minutes                            k8s_kube-proxy_kube-proxy-tzmgb_kube-system_601e548d-87fe-4dfb-b7ca-126ba8e267e2_0\nc5b1f26169e2        k8s.gcr.io/pause:3.6   \"/pause\"                 7 minutes ago       Up 7 minutes                            k8s_POD_coredns-565d847f94-zr6pd_kube-system_f28ff7fa-8899-4860-bdb5-6229fa339304_0\ndf9e76992434        k8s.gcr.io/pause:3.6   \"/pause\"                 7 minutes ago       Up 7 minutes                            k8s_POD_kube-proxy-tzmgb_kube-system_601e548d-87fe-4dfb-b7ca-126ba8e267e2_0\nafb8d718de0e        dbfceb93c69b           \"kube-controller-man…\"   8 minutes ago       Up 8 minutes                            k8s_kube-controller-manager_kube-controller-manager-minikube_kube-system_2e75927e0fd852156c6691ad3046836e_1\nd38816460fb5        97801f839490           \"kube-apiserver --ad…\"   8 minutes ago       Up 8 minutes                            k8s_kube-apiserver_kube-apiserver-minikube_kube-system_0043f0e06f8033573472a91b2322f830_0\n5730cd42e0d7        ca0ea1ee3cfd           \"kube-scheduler --au…\"   8 minutes ago       Up 8 minutes                            k8s_kube-scheduler_kube-scheduler-minikube_kube-system_d9e39786b2e03d044abb6c68064d5241_0\nc9d592d3afb3        a8a176a5d5d6           \"etcd --advertise-cl…\"   8 minutes ago       Up 8 minutes                            k8s_etcd_etcd-minikube_kube-system_bd495b7643dfc9d3194bd002e968bc3d_0\n36a4c8d23d9a        k8s.gcr.io/pause:3.6   \"/pause\"                 8 minutes ago       Up 8 minutes                            k8s_POD_kube-controller-manager-minikube_kube-system_2e75927e0fd852156c6691ad3046836e_0\n0dec781dbb16        k8s.gcr.io/pause:3.6   \"/pause\"                 8 minutes ago       Up 8 minutes                            k8s_POD_etcd-minikube_kube-system_bd495b7643dfc9d3194bd002e968bc3d_0\nf6a4e6053b1d        k8s.gcr.io/pause:3.6   \"/pause\"                 8 minutes ago       Up 8 minutes                            k8s_POD_kube-scheduler-minikube_kube-system_d9e39786b2e03d044abb6c68064d5241_0\n305e62608a38        k8s.gcr.io/pause:3.6   \"/pause\"                 8 minutes ago       Up 8 minutes                            k8s_POD_kube-apiserver-minikube_kube-system_0043f0e06f8033573472a91b2322f830_0\n```\n\n# Build, deploy and run an image on your local k8s setup\nFirst setup a local registry, so Kubernetes can pull the images from there\n```text\ndocker run -d -p 5000:5000 --restart=always --name registry registry:2\n```\n```text\nbash-5.2$ docker run -d -p 5000:5000 --restart=always --name registry registry:2\nUnable to find image 'registry:2' locally\n2: Pulling from library/registry\nca7dd9ec2225: Pull complete\nc41ae7ad2b39: Pull complete\n1ed0fc8a6161: Pull complete\n21df229223d2: Pull complete\n626897ccab21: Pull complete\nDigest: sha256:ce14a6258f37702ff3cd92232a6f5b81ace542d9f1631966999e9f7c1ee6ddba\nStatus: Downloaded newer image for registry:2\n7efa3289fa506fb581ceb4fb252f346c8bdeec2a1875d7ce5398af7a405ba06b\n```\n## Build\n- Build the Dockerfile below locally\n```text\nbash-5.2$ docker build . --tag my-app\nSending build context to Docker daemon  102.4kB\nStep 1/2 : FROM httpd:2.4-alpine\n2.4-alpine: Pulling from library/httpd\nc158987b0551: Pull complete\naf0dc97e3e7a: Pull complete\n7a4f45a5d61d: Pull complete\n3b6adf47f20b: Pull complete\na7c0837131ea: Pull complete\n82cf25aabba6: Pull complete\nDigest: sha256:86ed18b4670b3be349e62f05c34bf0c28f3e0a73732969c417fd53e04af807f4\nStatus: Downloaded newer image for httpd:2.4-alpine\n ---\u003e 4e7c9ee81ce6\nStep 2/2 : COPY ./index.html /usr/local/apache2/htdocs/\n ---\u003e ff1c26ada38c\nSuccessfully built ff1c26ada38c\nSuccessfully tagged my-app:latest\n```\n- You should now have an image named 'my-app' locally, check by using docker images (or your own image of course). You can then publish it to your local docker registry\n```text\ndocker tag my-app localhost:5000/my-app:0.1.0\n```\n- Running `docker images` should now output the following:\n```text\nbash-5.2$ docker images\nREPOSITORY                                TAG                 IMAGE ID            CREATED             SIZE\nlocalhost:5000/my-app                     0.1.0               ff1c26ada38c        3 minutes ago       56.9MB\nmy-app                                    latest              ff1c26ada38c        3 minutes ago       56.9MB\nhttpd                                     2.4-alpine          4e7c9ee81ce6        11 days ago         56.9MB\nregistry                                  2                   81c944c2288b        4 weeks ago         24.1MB\nregistry.k8s.io/kube-apiserver            v1.25.2             97801f839490        2 months ago        128MB\nregistry.k8s.io/kube-scheduler            v1.25.2             ca0ea1ee3cfd        2 months ago        50.6MB\nregistry.k8s.io/kube-controller-manager   v1.25.2             dbfceb93c69b        2 months ago        117MB\nregistry.k8s.io/kube-proxy                v1.25.2             1c7d8c51823b        2 months ago        61.7MB\nregistry.k8s.io/pause                     3.8                 4873874c08ef        5 months ago        711kB\nregistry.k8s.io/etcd                      3.5.4-0             a8a176a5d5d6        6 months ago        300MB\nregistry.k8s.io/coredns/coredns           v1.9.3              5185b96f0bec        6 months ago        48.8MB\nk8s.gcr.io/pause                          3.6                 6270bb605e12        15 months ago       683kB\ngcr.io/k8s-minikube/storage-provisioner   v5                  6e38f40d628d        20 months ago       31.5MB\n```\n\n## Deploy \u0026 Run\n- Creates Kubernetes objects:\n```text\nbash-5.2$ kubectl create -f my-app.yml\ndeployment.apps/my-app created\nservice/my-app created\n```\n- You should now see your pod and your service:\n```text\nbash-5.2$ kubectl get all\nNAME                          READY   STATUS    RESTARTS   AGE\npod/my-app-674df799d7-fsdn8   1/1     Running   0          4m4s\n\nNAME                 TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE\nservice/kubernetes   ClusterIP   10.96.0.1      \u003cnone\u003e        443/TCP        49m\nservice/my-app       NodePort    10.108.149.3   \u003cnone\u003e        80:31385/TCP   4m5s\n\nNAME                     READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/my-app   1/1     1            1           4m5s\n\nNAME                                DESIRED   CURRENT   READY   AGE\nreplicaset.apps/my-app-674df799d7   1         1         1       4m6s\n```\n- The configuration exposes my-app outside of the cluster, you can get the address to access it by running:\n```text\nbash-5.2$ minikube service my-app --url\nhttp://127.0.0.1:61249\n❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.\n```\nThis should give an output like `http://127.0.0.1:61249` (the port will most likely differ). you should see \"Hello World!\". You just accessed your application from outside of your local Kubernetes cluster!\n![hello-world.png](images%2Fhello-world.png)\n\n# Kubernetes GUI\n```text\nbash-5.2$ minikube dashboard\n🔌  Enabling dashboard ...\n    ▪ Using image docker.io/kubernetesui/dashboard:v2.7.0\n    ▪ Using image docker.io/kubernetesui/metrics-scraper:v1.0.8\n🤔  Verifying dashboard health ...\n🚀  Launching proxy ...\n🤔  Verifying proxy health ...\n🎉  Opening http://127.0.0.1:61358/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...\n```\n![kubernetes-dashboard.png](images%2Fkubernetes-dashboard.png)\n![kubernetes-deployments.png](images%2Fkubernetes-deployments.png)\n![kubernetes-replicasets.png](images%2Fkubernetes-replicasets.png)\n![kubernetes-services.png](images%2Fkubernetes-services.png)\n\n# Delete deployment of my-app\n```text\nbash-5.2$ kubectl delete deploy my-app\ndeployment.apps \"my-app\" deleted\n```\n```text\nbash-5.2$ kubectl delete service my-app\nservice \"my-app\" deleted\n```\nYou're now good to go and deploy other images!\n\n# Reset\n```text\nbash-5.2$ minikube stop;\n✋  Stopping node \"minikube\"  ...\n🛑  Powering off \"minikube\" via SSH ...\n🛑  1 node stopped.\nbash-5.2$ minikube delete;\n🔥  Deleting \"minikube\" in docker ...\n🔥  Deleting container \"minikube\" ...\n🔥  Removing /Users/ajay/.minikube/machines/minikube ...\n💀  Removed all traces of the \"minikube\" cluster.\nbash-5.2$ rm -rf ~/.minikube ~/.kube;\n```\n\n# Version\nLast tested on 2022 December 12th (**macOS High Sierra 10.13.6**)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaychinthapalli%2Fsetup-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajaychinthapalli%2Fsetup-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaychinthapalli%2Fsetup-kubernetes/lists"}