[{"data":1,"prerenderedAt":366},["ShallowReactive",2],{"navigation":3,"blog-page":14,"blogs":24},[4],{"title":5,"path":6,"stem":7,"children":8,"page":13},"Blog","\u002Fblog","blog",[9],{"title":10,"path":11,"stem":12},"Kubernetes Installation Guide - Ubuntu 22.04","\u002Fblog\u002Fkubernetes-installation-guide","blog\u002Fkubernetes-installation-guide",false,{"id":15,"title":16,"body":17,"description":18,"extension":19,"links":17,"meta":20,"navigation":21,"path":6,"seo":22,"stem":7,"__hash__":23},"pages\u002Fblog.yml","Latest Articles",null,"Some of my recent thoughts on design, development, and the tech industry.","yml",{},true,{"title":16,"description":18},"vycKbZXH6lUprkttlxVokzcLu31TOtP82HO4ECYI1yY",[25],{"id":26,"title":10,"author":27,"body":32,"date":358,"description":359,"extension":360,"image":361,"meta":362,"minRead":363,"navigation":21,"path":11,"seo":364,"stem":12,"__hash__":365},"blog\u002Fblog\u002Fkubernetes-installation-guide.md",{"name":28,"avatar":29},"Mohammed A.",{"src":30,"alt":31},"https:\u002F\u002Fapi.dicebear.com\u002F9.x\u002Fnotionists\u002Fsvg?seed=Mohammed&backgroundColor=e5e7eb","Developer avatar for Mohammed A.",{"type":33,"value":34,"toc":347},"minimark",[35,40,44,55,58,64,67,73,76,81,84,89,92,97,101,104,110,113,119,122,128,131,135,138,141,144,150,153,158,161,166,169,174,180,189,195,198,203,209,216,221,224,227,233,236,241,244,249,252,257,265,268,272,275,280,283,288,291,296,299,304,307,312,315,320,323,328,331,335,341],[36,37,39],"h2",{"id":38},"step-1-install-kubectl-binary-with-curl-on-linux","Step 1: Install kubectl binary with curl on Linux",[41,42,43],"p",{},"Download the latest release with the command:",[45,46,51],"pre",{"className":47,"code":49,"language":50},[48],"language-text","curl -LO \"https:\u002F\u002Fdl.k8s.io\u002Frelease\u002F$(curl -L -s https:\u002F\u002Fdl.k8s.io\u002Frelease\u002Fstable.txt)\u002Fbin\u002Flinux\u002Farm64\u002Fkubectl\"\n","text",[52,53,49],"code",{"__ignoreMap":54},"",[41,56,57],{},"Validate the binary, Download the kubectl checksum file:",[45,59,62],{"className":60,"code":61,"language":50},[48],"   curl -LO \"https:\u002F\u002Fdl.k8s.io\u002Frelease\u002F$(curl -L -s https:\u002F\u002Fdl.k8s.io\u002Frelease\u002Fstable.txt)\u002Fbin\u002Flinux\u002Farm64\u002Fkubectl.sha256\"\n",[52,63,61],{"__ignoreMap":54},[41,65,66],{},"Validate the kubectl binary against the checksum file:",[45,68,71],{"className":69,"code":70,"language":50},[48],"echo \"$(cat kubectl.sha256)  kubectl\" | sha256sum --check\n",[52,72,70],{"__ignoreMap":54},[41,74,75],{},"If valid, the output is:",[41,77,78],{},[52,79,80],{},"kubectl: OK",[41,82,83],{},"Install kubectl",[41,85,86],{},[52,87,88],{},"sudo install -o root -g root -m 0755 kubectl \u002Fusr\u002Flocal\u002Fbin\u002Fkubectl",[41,90,91],{},"Test to ensure the version you installed is up-to-date:",[41,93,94],{},[52,95,96],{},"kubectl version --client",[36,98,100],{"id":99},"step-2-install-docker-engine-on-ubuntu","Step 2: Install Docker Engine on Ubuntu",[41,102,103],{},"Set up Docker's apt repository.",[45,105,108],{"className":106,"code":107,"language":50},[48],"# Add Docker's official GPG key:\nsudo apt-get update\nsudo apt-get install ca-certificates curl gnupg\nsudo install -m 0755 -d \u002Fetc\u002Fapt\u002Fkeyrings\ncurl -fsSL https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fubuntu\u002Fgpg | sudo gpg --dearmor -o \u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg\nsudo chmod a+r \u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg\n\n# Add the repository to Apt sources:\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=\u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg] https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fubuntu \\\n  $(. \u002Fetc\u002Fos-release && echo \"$VERSION_CODENAME\") stable\" | \\\n  sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fdocker.list > \u002Fdev\u002Fnull\nsudo apt-get update\n\n",[52,109,107],{"__ignoreMap":54},[41,111,112],{},"Install the Docker packages.",[45,114,117],{"className":115,"code":116,"language":50},[48],"sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n",[52,118,116],{"__ignoreMap":54},[41,120,121],{},"Verify that the Docker Engine installation is successful by running the hello-world image.",[45,123,126],{"className":124,"code":125,"language":50},[48],"sudo docker run hello-world\n",[52,127,125],{"__ignoreMap":54},[41,129,130],{},"This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.",[36,132,134],{"id":133},"step-3-minikube-start","Step 3: minikube start",[41,136,137],{},"minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.",[41,139,140],{},"All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start",[41,142,143],{},"To install the latest minikube stable release on ARM64 Linux using binary download:",[45,145,148],{"className":146,"code":147,"language":50},[48],"curl -LO https:\u002F\u002Fstorage.googleapis.com\u002Fminikube\u002Freleases\u002Flatest\u002Fminikube-linux-arm64\n\nsudo install minikube-linux-arm64 \u002Fusr\u002Flocal\u002Fbin\u002Fminikube\n",[52,149,147],{"__ignoreMap":54},[41,151,152],{},"Start a cluster using the docker driver:",[41,154,155],{},[52,156,157],{},"minikube start --driver=docker",[41,159,160],{},"To make docker the default driver:",[41,162,163],{},[52,164,165],{},"minikube config set driver docker",[41,167,168],{},"If minikube fails to start, try to set permission to docker.sock",[41,170,171],{},[52,172,173],{},"sudo chmod 666 \u002Fvar\u002Frun\u002Fdocker.sock",[41,175,176,177],{},"netcat is needed to check network address, install it with ",[52,178,179],{},"sudo apt install netcat",[41,181,182,183],{},"kubeadm need to be installed to create a new cluster, visit ",[184,185,186],"a",{"href":186,"rel":187},"https:\u002F\u002Fkubernetes.io\u002Fdocs\u002Fsetup\u002Fproduction-environment\u002Ftools\u002Fkubeadm\u002Finstall-kubeadm\u002F#k8s-install-0",[188],"nofollow",[41,190,191,192],{},"Interact with your cluster\n",[52,193,194],{},"kubectl get po -A",[41,196,197],{},"You can also make your life easier by adding the following to your shell config: (for more details see: kubectl)",[41,199,200],{},[52,201,202],{},"alias kubectl=\"minikube kubectl --\"",[41,204,205,206],{},"Open dashboard\n",[52,207,208],{},"minikube dashboard",[41,210,211,212],{},"Congrats!!! Kubernetes installed and running on ",[184,213,214],{"href":214,"rel":215},"http:\u002F\u002F127.0.0.1:34307\u002F",[188],[217,218,220],"h3",{"id":219},"step-4-deploy-sample-application","Step 4: Deploy Sample application",[41,222,223],{},"Now deploy an example application",[41,225,226],{},"Create a sample deployment and expose it on port 8080:",[45,228,231],{"className":229,"code":230,"language":50},[48],"kubectl create deployment hello-minikube --image=kicbase\u002Fecho-server:1.0\n\nkubectl expose deployment hello-minikube --type=NodePort --port=8080\n",[52,232,230],{"__ignoreMap":54},[41,234,235],{},"It may take a moment, but your deployment will soon show up when you run:",[41,237,238],{},[52,239,240],{},"kubectl get services hello-minikube",[41,242,243],{},"The easiest way to access this service is to let minikube launch a web browser for you:",[41,245,246],{},[52,247,248],{},"minikube service hello-minikube",[41,250,251],{},"Alternatively, use kubectl to forward the port:",[41,253,254],{},[52,255,256],{},"kubectl port-forward service\u002Fhello-minikube 7080:8080",[41,258,259,260,264],{},"Tada! Your application is now available at ",[184,261,262],{"href":262,"rel":263},"http:\u002F\u002Flocalhost:7080\u002F",[188],".",[41,266,267],{},"You should be able to see the request metadata in the application output. Try changing the path of the request and observe the changes. Similarly, you can do a POST request and observe the body show up in the output.",[217,269,271],{"id":270},"step-5-managing-your-cluster","Step 5: Managing your cluster",[41,273,274],{},"Pause Kubernetes without impacting deployed applications:",[41,276,277],{},[52,278,279],{},"minikube pause",[41,281,282],{},"Unpause a paused instance:",[41,284,285],{},[52,286,287],{},"minikube unpause",[41,289,290],{},"Halt the cluster:",[41,292,293],{},[52,294,295],{},"minikube stop",[41,297,298],{},"Change the default memory limit (requires a restart):",[41,300,301],{},[52,302,303],{},"minikube config set memory 9001",[41,305,306],{},"Browse the catalog of easily installed Kubernetes services:",[41,308,309],{},[52,310,311],{},"minikube addons list",[41,313,314],{},"Create a second cluster running an older Kubernetes release:",[41,316,317],{},[52,318,319],{},"minikube start -p aged --kubernetes-version=v1.16.1",[41,321,322],{},"Delete all of the minikube clusters:",[41,324,325],{},[52,326,327],{},"minikube delete --all",[329,330],"h1",{"id":54},[217,332,334],{"id":333},"resources","Resources",[41,336,337],{},[184,338,339],{"href":339,"rel":340},"https:\u002F\u002Fkubernetes.io\u002Fdocs\u002Ftasks\u002Ftools\u002Finstall-kubectl-linux\u002F",[188],[41,342,343],{},[184,344,345],{"href":345,"rel":346},"https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002Fubuntu\u002F",[188],{"title":54,"searchDepth":348,"depth":348,"links":349},2,[350,351,352],{"id":38,"depth":348,"text":39},{"id":99,"depth":348,"text":100},{"id":133,"depth":348,"text":134,"children":353},[354,356,357],{"id":219,"depth":355,"text":220},3,{"id":270,"depth":355,"text":271},{"id":333,"depth":355,"text":334},"2026-08-31","A step-by-step guide to installing kubectl, Docker, and Minikube on Ubuntu 22.04, then deploying and managing your first local Kubernetes application.","md","https:\u002F\u002Fraw.githubusercontent.com\u002Fkubernetes\u002Fkubernetes\u002Fmaster\u002Flogo\u002Flogo.png",{},8,{"title":10,"description":359},"v_itpepVL-3wHexhv_JJVnnmPRIXZPwv_ErpdErayn0",1788444550930]