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 forgolangandjsonpathoutput formats.--dry-run="none"β has to be one of"none","server", or"client", no improvising π€. If you pick theclientstrategy, it only prints the object that would've been sent β it does not send it. If you pickserver, 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 runkubectl applyon this object later on π--show-managed-fields=falseβ if true, it keeps themanagedFieldsaround 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-templateor-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(ortrue),warn,ignore(orfalse). 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 ifServerSideFieldValidationis 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 theKUBECTL_KUBERC=falsefeature gate, or by turning off the feature withKUBERC=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=rawprints 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
- arch rolling: kubectl 1.37.2-1 Β· Apache-2.0
- fedora 43: kubernetes1.37-client 1.37.0-3.fc43
- fedora 43: kubernetes1.37-client 1.37.1-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.37-client 1.37.0-3.fc44
- fedora 44: kubernetes1.37-client 1.37.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: kubectl 1.37.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms