{"id":21712753,"url":"https://github.com/mhausenblas/gitops101","last_synced_at":"2025-03-20T18:26:46.458Z","repository":{"id":140043614,"uuid":"218977717","full_name":"mhausenblas/gitops101","owner":"mhausenblas","description":"GitOps 101","archived":false,"fork":false,"pushed_at":"2019-11-05T09:15:16.000Z","size":14,"stargazers_count":16,"open_issues_count":0,"forks_count":86,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T17:11:54.776Z","etag":null,"topics":["gitops"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhausenblas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-11-01T12:04:05.000Z","updated_at":"2023-08-24T10:39:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fff1942-8862-4e88-884b-f692f4a83da9","html_url":"https://github.com/mhausenblas/gitops101","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fgitops101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fgitops101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fgitops101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fgitops101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhausenblas","download_url":"https://codeload.github.com/mhausenblas/gitops101/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244668644,"owners_count":20490652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gitops"],"created_at":"2024-11-25T23:41:32.406Z","updated_at":"2025-03-20T18:26:46.438Z","avatar_url":"https://github.com/mhausenblas.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitOps 101\n\n## Preparation\n\nMake sure you have a GitHub account set up and visit the trainings environment URL \nprovided in the slide deck.\n\nFirst, fork this repo and clone it:\n\n```sh\ngit clone https://github.com/USERNAME/gitops101.git \n```\n\n## Set up Flux\n\nInstall Flux in the Kubernetes cluster:\n\n```sh\ncd gitops101\n\nkubectl apply -f ./flux/\n```\n\nDownload  `fluxctl` from [github.com/fluxcd/flux/releases](https://github.com/fluxcd/flux/releases/tag/1.15.0) \nand make it executable. For example, for Linux:\n\n```sh\ncurl -L -o fluxctl https://github.com/fluxcd/flux/releases/download/1.15.0/fluxctl_linux_amd64\nchmod +x fluxctl\n```\n\nGet the Flux operator's public key:\n\n```sh\n./fluxctl identity\n```\n\nNext, configure your GitHub repo with above public key (under Settings -\u003e Deploy keys).\n\nNow, edit `flux/flux-deployment.yaml` to change/add:\n\n```sh\n --git-url=\u003cGIT URL OF YOUR REPOSITORY\u003e\n --git-path=deploy/kubernetes\n```\n\nAnd make sure changes are reflected:\n\n```sh\nkubectl apply -f flux/flux-deployment.yaml\n```\n\n## Example flows\n\nNow GitOps away:\n\n```sh\ncp examples/podinfo-dep.yaml deploy/kubernetes\ngit add deploy\ngit commit -m \"adds new deployment to cluster\"\ngit push origin master\n```\n\nWait for some 5min until you see the `podinfo` deployment and pod:\n\n```sh\nwatch kubectl get pods,deploy\n```\n\nOther things to try:\n\n* Manually delete a deployment (`kubectl delete deploy/podinfo`)\n* Scale the `podinfo` deployment to 3 replicas\n* More via https://github.com/bricef/gitops-tutorial (the tutorial here is a stripped down version of this one)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhausenblas%2Fgitops101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhausenblas%2Fgitops101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhausenblas%2Fgitops101/lists"}