What is kubernetes-sigs/cli-utils?
In parallel with the Argo team, a Kubernetes SIG has been formed to cover topics such as kubectl
and focus on the standardization of the CLI framework and its dependencies. This SIG group created a set of Go libraries called cli-utils
in order to create an abstraction layer for kubectl
and it has evolved to support server-side use in GitOps controllers too. The core features of cli-utils
for GitOps are the following:
- Pruning
- Status interpretation
- Status lookup
- Diff and preview
- Waiting for reconciliation
- Resource ordering
- Explicit dependency ordering
- Implicit dependency ordering
- Applying time mutation
kapply usage
The Kubernetes SIG team for cli-utils
created a CLI called kapply
, which is not intended to be for production use, but it gives us a chance to understand the features and how we can better utilize the set of libraries provided in it.
Let’s now see an example of using kapply
and cli...