{"id":2950,"date":"2024-08-24T15:32:34","date_gmt":"2024-08-24T14:32:34","guid":{"rendered":"https:\/\/contentlabstudy.com\/soft\/?p=2950"},"modified":"2026-09-24T21:16:09","modified_gmt":"2026-09-24T20:16:09","slug":"local-kubernetes","status":"publish","type":"post","link":"https:\/\/contentlabstudy.com\/soft\/local-kubernetes\/","title":{"rendered":"Local Kubernetes"},"content":{"rendered":"<p><strong>Local Kubernetes<\/strong> is a cluster on a developer machine (kind, k3d, minikube, Docker Desktop). Use it to exercise manifests, operators, and \u201cdoes this Deployment even start,\u201d not to clone production. This site\u2019s host is not your laptop cluster.<\/p>\n<h2>kind vs k3d vs minikube<\/h2>\n<ul>\n<li><strong>kind:<\/strong> Kubernetes-in-Docker, CI-friendly, node images are containers. Good default for \u201ctest the YAML.\u201d<\/li>\n<li><strong>k3d:<\/strong> wraps k3s, fast, less memory. Fine for local apps.<\/li>\n<li><strong>minikube:<\/strong> older, still fine; VM or docker driver.<\/li>\n<\/ul>\n<p>Pick one per team so docs match. All of them are not EKS\/AKS\/GKE: no real multi-AZ, no cloud LB unless you fake it, different storage classes.<\/p>\n<h2>Workflow<\/h2>\n<pre><code>kind create cluster --name dev\nkubectl apply -k .\/deploy\/local\nkubectl -n app port-forward deploy\/api 8080:8080\n<\/code><\/pre>\n<p>Build images into the cluster\u2019s docker (kind load, k3d import). Pointing a local cluster at <code>image: myapp:latest<\/code> on Docker Hub will surprise you with an old public tag.<\/p>\n<h2>What breaks it<\/h2>\n<p><code>image: myapp:latest<\/code> is not in the kind nodes, so the pod pulls an old public tag or stays in <code>ImagePullBackOff<\/code>. Load the tag you built, and use that same tag in the Deployment.<\/p>\n<pre><code>kind load docker-image myapp:dev --name dev<\/code><\/pre>\n<pre><code>image: myapp:dev<\/code><\/pre>\n<h2>Pitfalls<\/h2>\n<ul>\n<li>Treating local as prod-like (real TLS, real IAM, real sizes).<\/li>\n<li>Leaving clusters running until Docker eats the laptop.<\/li>\n<li>Committing kubeconfigs with user certs.<\/li>\n<\/ul>\n<p>Ingress\/LB on local: <a href=\"\/soft\/local-kubernetes-with-load-balancer\/\">Local Kubernetes with Load Balancer<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Local Kubernetes is a cluster on a developer machine (kind, k3d, minikube, Docker Desktop). Use it to exercise manifests, operators, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[13],"tags":[],"class_list":["post-2950","post","type-post","status-publish","format-standard","hentry","category-software-deployment"],"_links":{"self":[{"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/posts\/2950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/comments?post=2950"}],"version-history":[{"count":4,"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/posts\/2950\/revisions"}],"predecessor-version":[{"id":3242,"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/posts\/2950\/revisions\/3242"}],"wp:attachment":[{"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/media?parent=2950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/categories?post=2950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contentlabstudy.com\/soft\/wp-json\/wp\/v2\/tags?post=2950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}