{"id":19656705,"url":"https://github.com/daggerok/gitkube-example","last_synced_at":"2025-02-27T02:21:08.325Z","repository":{"id":151041714,"uuid":"222040317","full_name":"daggerok/gitkube-example","owner":"daggerok","description":"Use regular git commands (git push workflow) for k8s deployments","archived":false,"fork":false,"pushed_at":"2019-11-16T17:33:59.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T00:45:13.542Z","etag":null,"topics":["docker-for-mac","docker-for-windows","gitkube","k8s","kubernetes-docker"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/daggerok.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":"2019-11-16T03:18:38.000Z","updated_at":"2019-11-16T17:34:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"36618266-890b-454e-992c-c9e07f12f8f0","html_url":"https://github.com/daggerok/gitkube-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fgitkube-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fgitkube-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fgitkube-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fgitkube-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/gitkube-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240964931,"owners_count":19885832,"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":["docker-for-mac","docker-for-windows","gitkube","k8s","kubernetes-docker"],"created_at":"2024-11-11T15:28:39.724Z","updated_at":"2025-02-27T02:21:08.300Z","avatar_url":"https://github.com/daggerok.png","language":"HTML","readme":"# gitkube cli\nUse regular git commands (git push workflow) for k8s deployments\n\n## first blood\n\n* install gitkube binaries by downloading it and putting into your bin directory...\n* when Dockerfile and k8s.yaml manifast will be created, run `gitkube install` command\n* generate gitkube remote.yaml manifest by using `gitkube remote generate -f mapp-remote.yaml` command\n* use custom configuration for `mapp` remote for docker registry and configure your username / password\n* create deployment first (even if docker images hasn't been built): `kubectl create -f k8s.yaml`\n* create remote by using `gitkube remote create -f mapp-remote.yaml` command\n* copy remote url as `export GIT_REMOTE_URL=ssh://default-mapp@localhost/~/git/default-mapp` and create `git remote add mapp $GIT_REMOTE_URL` command\n* now do deployment just with regular `git push mapp master` command!\n* ...open http://127.0.0.1:8080...\n\n## bug / cr\n\n* next time, fix some bug-fix or implement change-request and commit it with some usefull git message\n* finally redeploy new software by using regulat `git push mapp master` command again...\n\n## cleanup\n\n```bash\nkubectl delete -f k8s.yaml\nkubectl delete secret regsecret      -n default\nkubectl delete secret mapp-regsecret -n default\ngit remote rm mapp\ngitkube remote delete mapp\ngitkube uninstall\n```\n\n## re-do after clean / clone\n\n```bash\nkubectl create secret docker-registry regsecret --docker-server=https://index.docker.io/v1/ \\\n  --docker-username=daggerok --docker-email=daggerok@gmail.com \\\n  --docker-password=...\n\nkubectl create -f k8s.yaml\ngitkube remote create -f mapp-remote.yaml\ngit remote add mapp ssh://default-mapp@localhost/~/git/default-mapp\ngit push mapp master\nhttp :8080\n```\n\n## resources\n\n* https://github.com/hasura/gitkube/blob/master/docs/registry.md\n* https://github.com/hasura/gitkube\n* https://gitkube.sh/\n* https://www.youtube.com/watch?v=l9h03j0NDEg\n* https://www.youtube.com/watch?v=ECB9vLvBXog\n* https://www.youtube.com/watch?v=eRimsG6pDH8\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fgitkube-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fgitkube-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fgitkube-example/lists"}