OC(1)
π
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 forCapabilities.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 forCapabilities.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 exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=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 π
(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
- nixpkgs unstable: openshift 4.22.0-202605222050
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms