{"id":19070037,"url":"https://github.com/pyaesoneaungrgn/k8s-deploy-note","last_synced_at":"2026-03-19T08:02:07.033Z","repository":{"id":246064574,"uuid":"819996628","full_name":"PyaeSoneAungRgn/k8s-deploy-note","owner":"PyaeSoneAungRgn","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-28T14:49:09.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T03:42:52.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/PyaeSoneAungRgn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-25T15:35:58.000Z","updated_at":"2024-06-28T14:49:12.000Z","dependencies_parsed_at":"2024-06-25T17:27:20.354Z","dependency_job_id":"5c7e0794-88b3-44f9-b1d9-1046274f0a39","html_url":"https://github.com/PyaeSoneAungRgn/k8s-deploy-note","commit_stats":null,"previous_names":["pyaesoneaungrgn/k8s-deploy-note"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PyaeSoneAungRgn/k8s-deploy-note","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyaeSoneAungRgn%2Fk8s-deploy-note","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyaeSoneAungRgn%2Fk8s-deploy-note/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyaeSoneAungRgn%2Fk8s-deploy-note/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyaeSoneAungRgn%2Fk8s-deploy-note/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyaeSoneAungRgn","download_url":"https://codeload.github.com/PyaeSoneAungRgn/k8s-deploy-note/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyaeSoneAungRgn%2Fk8s-deploy-note/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29876347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T22:37:10.609Z","status":"ssl_error","status_checked_at":"2026-02-26T22:37:09.019Z","response_time":89,"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":[],"created_at":"2024-11-09T01:16:37.572Z","updated_at":"2026-02-26T23:02:27.462Z","avatar_url":"https://github.com/PyaeSoneAungRgn.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s deploy note (digital ocean)\n\n\u003e [!WARNING]\n\u003e I just learned Kubernetes in one night. My notes are just for myself.\n\n## push image to registry\n```bash\ndocker tag hello registry.digitalocean.com/hello/hello\ndocker push registry.digitalocean.com/hello/hello\n```\n\n## connect cluster\n```bash\ndoctl kubernetes cluster kubeconfig save {your-cluster}\n```\n\n#### check cluster\n```bash\nkubectl config get-contexts\n```\n\n## create deployment\n```bash\nkubectl apply -f k8s/deployment.yaml\n```\n\n#### check pod\n```bash\nkubectl get pod\n```\n\n## create service\n\nIn this case, use cluster ip\n```bash\nkubectl apply -f k8s/service.yaml\n```\n\n#### check srvice\n```bash\nkubectl get services\n```\n\n## install ingress\n\nIn this case, `k8s/nginx-values.yaml` to expose custom port at load-balancer\n```bash\nhelm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm repo update\nhelm install ingress-nginx ingress-nginx/ingress-nginx -f k8s/nginx-values.yaml\nkubectl apply -f k8s/ingress.yaml\n```\n\n#### check ingress\n```bash\nkubectl get service --namespace default ingress-nginx-controller --output wide\n```\n\n## install cert-manager\n```bash\nkubectl create namespace cert-manager\nhelm repo add jetstack https://charts.jetstack.io\nhelm repo update\nhelm install cert-manager jetstack/cert-manager --namespace cert-manager --version v1.10.1 --set installCRDs=true\nkubectl apply -f k8s/issuer.yaml\n```\n\n#### check cert\n```bash\nkubectl describe certificate {your-cert}\n```\n\n## auto scale\nfollow https://docs.digitalocean.com/products/kubernetes/how-to/set-up-autoscaling\n\n```bash\nkubectl apply -f k8s/hpa.yaml\n```\n\n#### check auto scale\n```bash\nkubectl top nodes\nkubectl get hpa\n```\n\n## Others\n\nupdate nginx value\n```bash\nhelm upgrade --install ingress-nginx ingress-nginx/ingress-nginx -f k8s/nginx-values.yaml\n```\n\nre-deploy\n```bash\nkubectl rollout restart deployment\n```\n\n## Reference\n\nhttps://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm\n\nhttps://serverfault.com/questions/1094259/how-do-i-create-a-kubernetes-service-that-routes-traffic-to-different-pods-based\n\nhttps://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyaesoneaungrgn%2Fk8s-deploy-note","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyaesoneaungrgn%2Fk8s-deploy-note","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyaesoneaungrgn%2Fk8s-deploy-note/lists"}