brew install g-crd/tap/setup Verify the installation:
- name: Deploy CRDs run: | g.crd/setup deploy \ --kubeconfig $ secrets.KUBECONFIG \ --dry-run=false \ --output summary g.crd/setup
g.crd/setup diff --show-managed-fields For automated pipelines, use the --dry-run and --output flags. g.crd/setup
g.crd/setup scaffold myresource.stable.example.com --version v1 --kind MyResource Catch errors before reaching the cluster: g.crd/setup
g.crd/setup can emit a standardized inventory file:
apiVersion: g.crd/v1 kind: SetupConfig metadata: name: production-setup spec: crdRoot: ./crd validation: enabled: true schemaPath: ./schemas deployment: strategy: apply # Options: apply, create, server-side namespace: crd-system hooks: preInstall: ./scripts/pre-check.sh postInstall: ./scripts/notify.sh Once configured, you can leverage these essential commands: 1. Scaffold a New CRD Generate a boilerplate CRD with a typed specification: