Authoring, Migrating, and Importing Configuration
Kubernetes/YAML
ConfigHub expects Kubernetes/YAML configuration units to be comprised of one or more Kubernetes resources each represented as a YAML document.
When not cloning from other Units in ConfigHub, we recommend you use other tools to author or render Kubernetes configuration as plain WET (Write Every Time) YAML, and then import it or upload it to ConfigHub with cub unit create or cub function do upsert-resource.
A number of off-the-shelf components (e.g., cert-manager) include plain YAML as well as Helm charts, kustomize patches, and other DRY (Don't Repeat Yourself) configuration generation formats.
Unlike Infrastructure as Code tools, no laborious templating is required to use generated configuration productively.
Because ConfigHub treats the configuration data as authoritative, configuration values do not need to be specified all at once. They can be decoupled in time. That means you can create a starting configuration and then edit and/or transform it until it meets your requirements.
AI
Use your favorite AI agent or chatbot to generate the Kubernetes YAML, and even to upload it.
Use cub function local vet-schemas to validate the resources prior to uploading them.
Import
cub unit import can be used to import resources that are already live in a Kubernetes cluster.
Helm
You could use helm template, but we added a cub helm install command to make the process a little easier. See the Helm Guide.
Kubectl
We wrote a little kube-gen script to make it a little easier to use kubectl create commands to generate basic Kubernetes resources. It essentially does:
kubectl create "${resource_type}" -o yaml --dry-run=client "${@}" ${namespace}
Pronounced "kube control" ;-).
Kustomize
The base resources could be uploaded into units directly, then cloned in order to create a similar variant hierarchy in ConfigHub. Functions could replace the use of patches a number of cases. Do not include the kustomization.yaml file, which is not relevant to ConfigHub is frequently isn't fully valid KRM.
Or, similar to Helm, kustomize build could be used to render the resources prior to uploading.
Kompose
Use kompose convert to render your compose file as Kubernetes YAML.
Cdk8s
Render your cdk8s App and upload the YAML file(s) from the dist directory.
Specialized generation tools
The use of more specialized configuration generation tools is encouraged as well.
For instance, there are a number of RBAC generation tools, such as https://github.com/alcideio/rbac-tool.
https://k8syaml.com/ can generate Kubernetes workload resources.