![Forrest logo](/images/logo.png)
kustomize:tldr:cfd63
kustomize: Create kustomization file with resources and namespace.
$ kustomize create --resources ${deployment-yaml,service-yaml} --namespace ${staging}
try on your machine
The command "kustomize create" is used to create a new kustomization file. Kustomize is a tool that allows you to customize Kubernetes yaml files by applying patches, adding resources, and modifying existing resources.
In this specific command, the options and arguments are as follows:
- "create" is the command to create a new kustomization file.
- "--resources" specifies the resources to include in the kustomization. It accepts one or more yaml files or directories containing yaml files. In this case, it includes the "deployment-yaml" and "service-yaml" files.
- "${deployment-yaml,service-yaml}" is a placeholder that is expected to be replaced with the actual filenames of the deployment and service yaml files.
- "--namespace" specifies the namespace to use for the resources. In this case, it uses the "staging" namespace.
- "${staging}" is a placeholder that is expected to be replaced with the actual namespace name.
Overall, this command creates a new kustomization file and includes the specified deployment and service yaml files as resources. It also sets the desired namespace for the resources to the "staging" namespace.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.