KUBERNETES(1)(kubernetes)

✨ NAME ✨

kubectl create namespace β€” bestie, this makes you a namespace with the name you pick πŸ’…

(it lives in the kubernetes manual, section 1, and yeah the page header credits Eric Paris, Jan 2015 β€” we'll get to that at the end 🫢)


🌸 SYNOPSIS 🌸

kubectl create namespace [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so literally what it says on the tin: you make a namespace, and you give it the name you want. That's it. That's the whole vibe. a whole new little world inside your cluster ✨


πŸ’– OPTIONS πŸ’–

  • --allow-missing-template-keys=true β€” if this is true, any errors in templates when a field or a map key is missing from the template just get ignored, no drama. Heads up tho: this only does anything for golang and jsonpath output formats.
  • --dry-run="none" β€” has to be one of "none", "server", or "client", no improvising 😀. If you pick the client strategy, it only prints the object that would've been sent β€” it does not send it. If you pick server, it submits a server-side request but does not persist the resource. Like a rehearsal, but for your cluster 🎭
  • --field-manager="kubectl-create" β€” the name of the manager that's used to track field ownership. iykyk πŸ‘‘
  • -o, --output="" β€” the output format, bestie. Pick exactly one of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
  • --save-config=false β€” if true, the configuration of the current object gets saved into its annotation. If false, the annotation stays exactly as it was, untouched, no notes. This flag is lowkey the move when you wanna run kubectl apply on this object later on πŸ“
  • --show-managed-fields=false β€” if true, it keeps the managedFields around when it prints objects in JSON or YAML format. Otherwise they get hidden πŸ™ˆ
  • --template="" β€” a template string, or a path to a template file, to use when you're doing -o=go-template or -o=go-template-file. The template format is golang templates β€” here's the lore: [http://golang.org/pkg/text/template/#pkg-overview]
  • --validate="strict" β€” must be one of: strict (or true), warn, ignore (or false). Breaking it down fr fr:
    • "true" or "strict" uses a schema to validate the input and fails the request if it's invalid. It'll do server side validation if ServerSideFieldValidation is enabled on the api-server, but it falls back to the less reliable client-side validation if it isn't.
    • "warn" warns you about unknown or duplicate fields without blocking the request, if server-side field validation is enabled on the API server β€” and otherwise it just behaves like "ignore".
    • "false" or "ignore" does no schema validation at all, silently dropping any unknown or duplicate fields. silently. be so serious rn 😭

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

These ones you didn't even have to ask for β€” they come from the parent command, and they still hit πŸ’…

  • --as="" β€” username to impersonate for the operation. Could be a regular user, or a service account in a namespace 🎭
  • --as-group=[] β€” group to impersonate for the operation. You can repeat this flag to specify multiple groups, stack 'em up 🫢
  • --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="/home/username/.kube/cache" β€” the 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, you 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. like, actually insecure, not a cute insecure πŸ’€
  • --kubeconfig="" β€” path to the kubeconfig file to use for CLI requests.
  • --kuberc="" β€” path to the kuberc file to use for preferences. You can turn this off by exporting the KUBECTL_KUBERC=false feature gate, or by turning off the feature with KUBERC=off.
  • --match-server-version=false β€” require the server version to match the client version. no mismatches allowed, we're matching 🀝
  • -n, --namespace="" β€” if present, the namespace scope for this CLI request.
  • --password="" β€” password for basic authentication to the API server.
  • --profile="none" β€” name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex|trace).
  • --profile-output="profile.pprof" β€” name of the file to write the profile to.
  • --proxy-url="" β€” proxy URL to use for requests to the API server.
  • --request-timeout="0" β€” how long 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 β€” literally just vibing forever ⏳
  • -s, --server="" β€” the address and port of the Kubernetes API server.
  • --tls-server-name="" β€” server name to use for server certificate validation. If it's 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.
  • --username="" β€” username for basic authentication to the API server.
  • --version=false β€” --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version. yes you can just lie about your version, we don't judge 🫣
  • --warnings-as-errors=false β€” treat warnings received from the server as errors, and exit with a non-zero exit code. the warnings said what they said and now they're ✨consequences✨

🌈 EXAMPLE 🌈

# Create a new namespace named my-namespace
kubectl create namespace my-namespace

look at you go. iconic. periodt πŸ’…


πŸŽ€ SEE ALSO πŸŽ€


🧚 HISTORY 🧚

January 2015, originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material β€” but hopefully they have been automatically generated since! 😭 bestie really said "please let a robot do this from now on" and honestly, valid.


and that's the whole page, no cap πŸ’– this was the kubernetes manual, section 1, page KUBERNETES(1)(kubernetes), living under the Manuals umbrella in the User corner of your man pages πŸ¦‹ go make a namespace, you absolute main character πŸ‘‘

πŸ“¦ where this page comes from