{"id":38094461,"url":"https://github.com/mgoltzsche/k8spkg","last_synced_at":"2026-01-24T10:00:52.884Z","repository":{"id":38962493,"uuid":"194566555","full_name":"mgoltzsche/k8spkg","owner":"mgoltzsche","description":"A Kubernetes component lifecycle manager CLI (deprecated in favour of kpt)","archived":true,"fork":false,"pushed_at":"2023-02-17T00:17:15.000Z","size":10632,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T01:28:11.715Z","etag":null,"topics":["continuous-delivery","k8s","kubernetes","kustomize","lifecycle","lifecycle-management","package","rollout"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mgoltzsche.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}},"created_at":"2019-06-30T22:21:03.000Z","updated_at":"2023-11-16T03:40:12.000Z","dependencies_parsed_at":"2022-09-19T18:42:05.518Z","dependency_job_id":null,"html_url":"https://github.com/mgoltzsche/k8spkg","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"4044a9d90416e8af331eb21ebbf130e225d27c2a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mgoltzsche/k8spkg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fk8spkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fk8spkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fk8spkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fk8spkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgoltzsche","download_url":"https://codeload.github.com/mgoltzsche/k8spkg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fk8spkg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28724374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","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":["continuous-delivery","k8s","kubernetes","kustomize","lifecycle","lifecycle-management","package","rollout"],"created_at":"2026-01-16T21:00:23.269Z","updated_at":"2026-01-24T10:00:52.879Z","avatar_url":"https://github.com/mgoltzsche.png","language":"Go","funding_links":[],"categories":["Configuration Management"],"sub_categories":[],"readme":"k8spkg\n[![Build Status](https://travis-ci.org/mgoltzsche/k8spkg.svg?branch=master)](https://travis-ci.org/mgoltzsche/k8spkg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mgoltzsche/k8spkg)](https://goreportcard.com/report/github.com/mgoltzsche/k8spkg)\n=\n\nA wrapper around kubectl to transform, deploy, undeploy and retrieve\n[Kubernetes](https://github.com/kubernetes/kubernetes) manifests as\na deployment unit waiting for the respective task to be completed.\nk8spkg accepts manifest files and\n[kustomizations](https://github.com/kubernetes-sigs/kustomize)\nlike kubectl.\n\n## Features\n\n- Maintain a group of Kubernetes resources as package using [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/) (`app.kubernetes.io/part-of`, `k8spkg.mgoltzsche.github.com/namespaces`).\n- Add common labels to a manifest's resources (using [kustomize](https://github.com/kubernetes-sigs/kustomize)).\n- Wait for conditions (ready, available, ...) of a manifest's resources.\n- List installed packages: Packages are visible within their resources' namespace(s) only as long as they don't have cluster-scoped resources as well.\n- Delete resources by package name or manifest and wait until they are deleted.\n- [kustomization](https://github.com/kubernetes-sigs/kustomize) source support.\n\n## Requirements\n\n- [Git](https://git-scm.com/) 2.3 (optional)\n- [Kubernetes](https://github.com/kubernetes/kubernetes) 1.11\n\n## Usage\n\n| Command | Description |\n|-------|-------------|\n| `manifest {-f SRC\\|-k SRC} [--name \u003cPKG\u003e] [--namespace \u003cNS\u003e] [--timeout \u003cDURATION\u003e]` | Prints a merged and labeled manifest |\n| `apply {-f SRC\\|-k SRC} [--name \u003cPKG\u003e] [--namespace \u003cNS\u003e] [--timeout \u003cDURATION\u003e] [--prune]` | Installs or updates the provided source as package and waits for the rollout to succeed. `--prune` deletes all resources labeled with the package name that do not appear within the source from the cluster - should be used carefully. |\n| `delete {-f SRC\\|-k SRC\\|PKG} [--namespace \u003cNS\u003e] [--timeout \u003cDURATION\u003e]` | Deletes the identified resources from the cluster and awaits their deletion. A package's resources in other namespaces that are referred to (label) within cluster-scoped resources are deleted as well. |\n| `list [--all-namespaces\\|--namespace \u003cNS\u003e] [--timeout \u003cDURATION\u003e]` | Lists the installed packages that are visible within the namespace. Other namespaces are not queried as long as `--all-namespaces` is not enabled. However packages of cluster-scoped resources and their referenced (label) namespaces are listed as well. |\n\n### Examples\n\nPrint labeled manifest of the deployment unit `cert-manager`:\n```\n$ k8spkg manifest --name cert-manager -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.7/deploy/manifests/cert-manager.yaml\n\u003cYAML output\u003e\n```\n\nLabel and deploy `cert-manager` and a namespaced issuer afterwards:\n```\nk8spkg apply --name cert-manager -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.7/deploy/manifests/cert-manager.yaml \u0026\u0026\nk8spkg apply --name cert-manager-ca-issuer -f ca-issuer.yaml\n```\n_Please note that this does not (yet?!) work with `kubectl apply` since it does not wait for resources to be ready (cert-manager's APIService must accept the Issuer) and there is no option or other generic `kubectl` command to wait for such a state based on a given manifest. Fortunately `kubectl rollout` and `kubectl wait` serve this purpose but require resource names and type-dependent options which k8spkg provides._  \n\nList the installed packages from within the `default` namespace:\n```\n$ k8spkg list\nPACKAGE                   NAMESPACES\ncert-manager              cert-manager,kube-system\n```\n\nList the installed packages wtthin `cert-manager` namespace:\n```\n$ k8spkg list -n cert-manager\nPACKAGE                   NAMESPACES\ncert-manager              cert-manager,kube-system\ncert-manager-ca-issuer    cert-manager\n```\n\nLabel and deploy a kustomize package:\n```\nk8spkg apply --name hello-world -k github.com/kubernetes-sigs/kustomize//examples/helloWorld?ref=v2.1.0\n```\n\nInstall or update a package in another namespace:\n```\nk8spkg apply -n mynamespace --name hello-world --prune -k github.com/kubernetes-sigs/kustomize//examples/helloWorld?ref=v2.1.0\n```\n\nDelete a previously installed package:\n```\nk8spkg delete -n cert-manager cert-manager-ca-issuer\n```\n\n## Install\n\n[Download](https://github.com/mgoltzsche/k8spkg/releases/latest/download/k8spkg) and install the latest k8spkg release (static linux amd64):\n```\ncurl -L https://github.com/mgoltzsche/k8spkg/releases/latest/download/k8spkg \u003e k8spkg\nchmod +x k8spkg\nsudo mv k8spkg /usr/local/bin/k8spkg\n```\n\n## Build\n\nInstall/update with Go:\n```\ngo get -u github.com/mgoltzsche/k8spkg\n```\nor run a dockerized k8spkg build:\n```\ngit clone https://github.com/mgoltzsche/k8spkg\ncd k8spkg \u0026\u0026 make\nsudo mv k8spkg /usr/local/bin/\n```  \n\n_The project can be opened in a containerized [LiteIDE](https://github.com/visualfc/liteide) using `make ide`._\n\n## License\n\nk8spkg is licensed under [Apache License 2.0](./LICENSE).\nSome of the 3rd party modules in the `vendor` directory are licensed under different Open Source conditions (see `LICENSE` files).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fk8spkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgoltzsche%2Fk8spkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fk8spkg/lists"}