{"id":15090086,"url":"https://github.com/carlohcs/kubernetes-ci-cd-github-actions","last_synced_at":"2026-02-03T13:06:52.624Z","repository":{"id":251555240,"uuid":"837713336","full_name":"carlohcs/kubernetes-ci-cd-github-actions","owner":"carlohcs","description":"This project is a comprehensive guide to implementing CI/CD pipelines for Kubernetes using GitHub Actions. It covers everything from setting up a Kubernetes cluster to automating the deployment process with GitHub Actions.","archived":false,"fork":false,"pushed_at":"2024-08-12T18:53:36.000Z","size":372,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T11:04:44.821Z","etag":null,"topics":["actions","github-actions","k8s","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Astro","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/carlohcs.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-08-03T19:47:55.000Z","updated_at":"2024-08-12T18:53:40.000Z","dependencies_parsed_at":"2025-03-21T15:46:08.841Z","dependency_job_id":"bb68f922-fcfa-497a-bc26-55168ff354c1","html_url":"https://github.com/carlohcs/kubernetes-ci-cd-github-actions","commit_stats":null,"previous_names":["carlohcs/kubernetes-ci-cd-github-actions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carlohcs/kubernetes-ci-cd-github-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlohcs%2Fkubernetes-ci-cd-github-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlohcs%2Fkubernetes-ci-cd-github-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlohcs%2Fkubernetes-ci-cd-github-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlohcs%2Fkubernetes-ci-cd-github-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlohcs","download_url":"https://codeload.github.com/carlohcs/kubernetes-ci-cd-github-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlohcs%2Fkubernetes-ci-cd-github-actions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29046503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"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":["actions","github-actions","k8s","kubernetes"],"created_at":"2024-09-25T09:20:28.553Z","updated_at":"2026-02-03T13:06:52.601Z","avatar_url":"https://github.com/carlohcs.png","language":"Astro","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes with CI/CD and GitHub Actions\n\n![Running application example](./docs/hello-world.png)\n\nThis project is a comprehensive guide to implementing CI/CD pipelines for Kubernetes using GitHub Actions.\n\nIt covers everything from setting up a Kubernetes cluster to automating the deployment process with GitHub Actions.\n\nWhether you're new to Kubernetes or looking to enhance your existing CI/CD workflows, this guide provides step-by-step instructions and best practices to streamline your development process.\n\nWith the power of GitHub Actions, you can easily automate the building, testing, and deployment of your Kubernetes applications, ensuring faster and more reliable releases.\n\nGet started today and take your CI/CD to the next level with Kubernetes and GitHub Actions.\n\n## Disambiguation\n\n**CI (Continuous Integration)** is the practice of automating the integration of code changes from multiple contributors into a project.\n\n**CD (Continuous Delivery)** is the practice of automating the delivery of changed code to production environments, ensuring that the software is always deployable.\n\n## Steps\n\n### On your cloned version of this repository\n\nChange the data:\n\n- Cluster name;\n- Docker username;\n- Docker image name;\n\nIn [.github/workflows/cd.yml](.github/workflows/cd.yml)\n\nChange the data:\n\n- Image name;\n\nIn [k8s/node-deployment.yaml](k8s/node-deployment.yaml)\n\n### On Amazon\n\n- Create a cluster, eg.:\n  - ![Cluster example](./docs/cluster.jpeg)\n- Create a node linked to this cluster, eg.:\n  - ![Node example](./docs/node.jpeg)\n- Get the data from:\n  - `AWS_ACCESS_KEY_ID`;\n  - `AWS_SECRET_ACCESS_KEY`;\n  - `AWS_SESSION_TOKEN`\n    - Within default account: [https://stackoverflow.com/a/37947853/3929980](https://stackoverflow.com/a/37947853/3929980)\n    - Within AWS Academy:\n      - `AWS Details` \u003e `AWS CLI` \u003e `Show`\n\n### On Google\n\n#### Locally\n\n1. Ensure:\n\n  - you have `gcloud` installed: [https://cloud.google.com/sdk/docs/install](https://cloud.google.com/sdk/docs/install) or [https://cloud.google.com/sdk/docs/downloads-interactive](https://cloud.google.com/sdk/docs/downloads-interactive)\n  - you are logged in: `gcloud auth login`\n  - you are in a project: `gcloud config set project \u003cPROJECT_ID\u003e` eg.: `gcloud config set project thermal-micron-427901-e1`\n\n2. Create a GKE Cluster:\n\n```bash\ngcloud container clusters create $GKE_CLUSTER \\\n\t--project=$GKE_PROJECT \\\n\t--zone=$GKE_ZONE\n```\n\neg.:\n\n```bash\nexport GKE_CLUSTER=my-cluster; export GKE_PROJECT=thermal-micron-427901-e1; export GKE_ZONE=us-east1; gcloud container clusters create $GKE_CLUSTER --project=$GKE_PROJECT --zone=$GKE_ZONE --disk-type pd-standard --num-nodes=1 --machine-type=e2-micro --node-locations=us-east1-b\n```\n\n* `--num-nodes` reduce the number of nodes;  `---machine-type` define cpu resources;\n* `--node-locations` define number of available zones;\n* `--disk-type pd-standard` prevents the error about quota)\n\n3. Follow [https://docs.github.com/en/actions/use-cases-and-examples/deploying/deploying-to-google-kubernetes-engine](https://docs.github.com/en/actions/use-cases-and-examples/deploying/deploying-to-google-kubernetes-engine) until before `Creating the workflow` topic.\n\n## On Docker Hub\n\n- Create a Personal Access Token - [https://app.docker.com/settings/personal-access-tokens/create](https://app.docker.com/settings/personal-access-tokens/create)\n\n## On GitHub\n\nWith the cloned version of this repository, go to your repository and Settings:\n\n- `Security` \u003e `Actions`;\n- Go to `Secrets` tab, `New repository secret`:\n  - ![Secrets example](./docs/secrets-github.jpeg)\n  - Add the following tokens with the previous captured values:\n    - `AWS_ACCESS_KEY_ID`;\n    - `AWS_SECRET_ACCESS_KEY`;\n    - `AWS_SESSION_TOKEN`;\n    - `DOCKERHUB_TOKEN`.\n\n## When developing\n\nWhen a commit is made, if everything is correct, we see the images:\n\n- Commit checks:\n  - ![Secrets example](./docs/all-builds-are-ok.jpeg)\n- CI\n  - ![CI](./docs/ci.png)\n- CD:\n  - ![CD](./docs/cd.jpeg)\n\n### Tips\n\n### Building the image locally\n\n```bash\ndocker build . -t carlohcs/kubernetes-ci-cd-github-actions\n```\n\n### Running the application locally (after image build)\n\n```bash\ndocker run -p 3000:3000 carlohcs/kubernetes-ci-cd-github-actions\n```\n\n### GKE - Best zone\n\n[https://googlecloudplatform.github.io/region-picker/](https://googlecloudplatform.github.io/region-picker/)\n\n---\nEnjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlohcs%2Fkubernetes-ci-cd-github-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlohcs%2Fkubernetes-ci-cd-github-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlohcs%2Fkubernetes-ci-cd-github-actions/lists"}