OC(1)

πŸ“¦
version 4.22.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… OC(1) β€” the oc kustomize era

okay so bestie, welcome to oc, the OpenShift CLI (this page is OC(1) if you're keeping receipts 🧾). Today's main character is the kustomize subcommand and it is literally here to build stuff for you. Buckle up πŸŽ€


✨ NAME ✨

oc kustomize β€” build a kustomization target from a directory or URL πŸ¦‹


🌸 SYNOPSIS 🌸

oc kustomize [OPTIONS]

πŸ’– DESCRIPTION πŸ’–

So what it does: it builds a set of KRM resources using a kustomization.yaml file. No cap, that's the whole vibe.

The DIR argument has to be a path to a directory containing kustomization.yaml, or a git repository URL with a path suffix that points at the same thing relative to the repo root. And if you just... omit DIR? '.' is assumed. She assumes. Iconic πŸ’…


✨ OPTIONS ✨

  • --as-current-user=false β€” use the uid and gid of whoever's running the command to run the function in the container 🫢
  • --enable-alpha-plugins=false β€” enable kustomize plugins ✨
  • --enable-helm=false β€” enable use of the Helm chart inflator generator πŸŽ€
  • -e, --env=[] β€” a list of environment variables to be used by functions 🌸
  • --helm-api-versions=[] β€” Kubernetes api versions used by Helm for Capabilities.APIVersions
  • --helm-command="helm" β€” helm command (path to executable) πŸ‘‘
  • --helm-debug=false β€” enable debug output from the Helm chart inflator generator πŸ›
  • --helm-kube-version="" β€” Kubernetes version used by Helm for Capabilities.KubeVersion
  • --load-restrictor="LoadRestrictionsRootOnly" β€” if you set this to 'LoadRestrictionsNone', local kustomizations may load files from outside their root. Sounds fun? It does, however, break the relocatability of the kustomization πŸ’€ so like, know what you're doing
  • --mount=[] β€” a list of storage options read from the filesystem πŸ“
  • --network=false β€” enable network access for functions that declare it 🌈
  • --network-name="bridge" β€” the docker network to run the container in
  • -o, --output="" β€” if specified, write output to this path ✨

🧚 OPTIONS INHERITED FROM PARENT COMMANDS 🧚

(yeah she got them from her parent commands, it's giving family business πŸ‘‘

  • --as="" β€” username to impersonate for the operation. User could be a regular user or a service account in a namespace 🫢
  • --as-group=[] β€” group to impersonate for the operation. This flag can be repeated to specify multiple groups
  • --as-uid="" β€” UID to impersonate for the operation
  • --as-user-extra=[] β€” user extras to impersonate for the operation. This flag can be repeated to specify multiple values for the same key πŸ”‘
  • --cache-dir="/homeless-shelter/.kube/cache" β€” default cache directory πŸ“
  • --certificate-authority="" β€” path to a cert file for the certificate authority
  • --client-certificate="" β€” path to a client certificate file for TLS
  • --client-key="" β€” path to a client key file for TLS πŸ”
  • --cluster="" β€” the name of the kubeconfig cluster to use
  • --context="" β€” the name of the kubeconfig context to use
  • --disable-compression=false β€” if true, opt-out of response compression for all requests to the server
  • --insecure-skip-tls-verify=false β€” if true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure 😭 please be careful bestie
  • --kubeconfig="" β€” path to the kubeconfig file to use for CLI requests
  • --kuberc="" β€” path to the kuberc file to use for preferences. This can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off πŸŽ€
  • --match-server-version=false β€” require server version to match client version
  • -n, --namespace="" β€” if present, the namespace scope for this CLI request
  • --profile="none" β€” name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) πŸ“Š
  • --profile-output="profile.pprof" β€” name of the file to write the profile to
  • --request-timeout="0" β€” the length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests ⏰
  • -s, --server="" β€” the address and port of the Kubernetes API server
  • --tls-server-name="" β€” server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
  • --token="" β€” bearer token for authentication to the API server πŸ”‘
  • --user="" β€” the name of the kubeconfig user to use
  • --warnings-as-errors=false β€” treat warnings received from the server as errors and exit with a non-zero exit code πŸ’€

πŸ”₯ EXAMPLE πŸ”₯

# Build the current working directory
oc kustomize

# Build some shared configuration directory
oc kustomize /home/config/production

# Build from github
oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6

like, look at her go πŸƒβ€β™€οΈπŸ’¨


πŸ‘‘ SEE ALSO πŸ‘‘

oc(1),

(that's it. that's the list. short and sweet, iykyk πŸ’…)


πŸ’œ HISTORY πŸ’œ

June 2016, ported from the Kubernetes man-doc generator 🌈 β€” girl's been around a while, respect the elders fr fr


and that's the whole page bestie 🫢✨ love u, go build something iconic πŸ’–

β€” sign-off era: Openshift Β· Openshift CLI User Manuals Β· OC(1) Β· dated June 2016 πŸŽ€πŸ’œ

πŸ“¦ where this page comes from