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