OC-CREATE-NAMESPACE(1)

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

πŸ’… OC CREATE NAMESPACE πŸ’…

Hey bestie! Welcome to the oc create namespace glow-up page. This is the OpenShift CLI manual, originally from June 2016, and we're about to make a namespace together. No cap, it's iconic.


✨ NAME ✨

oc create namespace β€” Create a namespace with the specified name. Literally that's it. She's simple, she's effective, she's serving main character energy. πŸŽ€


🌸 SYNOPSIS 🌸

oc create namespace [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

Create a namespace with the specified name. Periodt. You tell her the name, she makes the namespace. It's giving "effortless queen." πŸ’–


πŸ’… OPTIONS πŸ’…

Okay so here's where it gets juicy. Every flag, every default, every vibe. Let's go. 🫢

  • --allow-missing-template-keys=true β€” If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. Basically she's like "bestie, missing keys? Not my problem, I'm ignoring them." πŸ™ˆ
  • --dry-run="none" β€” Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource. So you can peek at the tea before actually spilling it. πŸ’€
  • --field-manager="kubectl-create" β€” Name of the manager used to track field ownership. She's the manager. She owns the fields. Respect her authority. πŸ‘‘
  • -o, --output="" β€” Output format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). Pick your fighter. ✨
  • --save-config=false β€” If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future. It's giving "save your work for later," lowkey foresight queen. 🌈
  • --show-managed-fields=false β€” If true, keep the managedFields when printing objects in JSON or YAML format. Show off those managed fields, bestie! ⭐
  • --template="" β€” Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [⟨http://golang.org/pkg/text/template/#pkg-overview⟩]. Ngl, this one's for the template girlies. 🧚
  • --validate="ignore" β€” Must be one of: strict (or true), warn, ignore (or false).
    • "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.
    • "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise.
    • "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.

She's got layers, okay? πŸ’–


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

These are the flags she inherited from her parent commands. Family heirlooms, if you will. 🫢

  • --as="" β€” Username to impersonate for the operation. User could be a regular user or a service account in a namespace. Be someone else for a sec, it's fun. 🎭
  • --as-group=[] β€” Group to impersonate for the operation, this flag can be repeated to specify multiple groups. Collect them all like PokΓ©mon cards. πŸ“
  • --as-uid="" β€” UID to impersonate for the operation. The ultimate identity flex. πŸ’…
  • --as-user-extra=[] β€” User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key. Extra, extra! πŸ—žοΈ
  • --cache-dir="/homeless-shelter/.kube/cache" β€” Default cache directory. She's homeless-sheltered, don't ask. 😭
  • --certificate-authority="" β€” Path to a cert file for the certificate authority. Trust issues? Same. But this one's legit. πŸ”
  • --client-certificate="" β€” Path to a client certificate file for TLS. Your VIP pass. 🎟️
  • --client-key="" β€” Path to a client key file for TLS. The key to the VIP lounge. πŸ—οΈ
  • --cluster="" β€” The name of the kubeconfig cluster to use. Pick your cluster, bestie. 🌐
  • --context="" β€” The name of the kubeconfig context to use. Context is everything. πŸ’β€β™€οΈ
  • --disable-compression=false β€” If true, opt-out of response compression for all requests to the server. Uncompressed and unbothered. πŸ’…
  • --insecure-skip-tls-verify=false β€” If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. ⚠️ Bestie, be careful with this one. It's literally insecure, no cap. 🚨
  • --kubeconfig="" β€” Path to the kubeconfig file to use for CLI requests. Your config, your rules. πŸ—‚οΈ
  • --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. Preferences, but make it optional. ✨
  • --match-server-version=false β€” Require server version to match client version. She's picky, and honestly? Same. πŸ’…
  • -n, --namespace="" β€” If present, the namespace scope for this CLI request. Put a pin in it. πŸ“Œ
  • --profile="none" β€” Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex). Capture the vibes, profile the performance. πŸ“Š
  • --profile-output="profile.pprof" β€” Name of the file to write the profile to. Save it for later. πŸ’Ύ
  • --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. Zero chill? No, zero timeout. ⏳
  • -s, --server="" β€” The address and port of the Kubernetes API server. Where the magic happens. 🌟
  • --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. Name check, but for certificates. πŸͺͺ
  • --token="" β€” Bearer token for authentication to the API server. Your golden ticket. 🎫
  • --user="" β€” The name of the kubeconfig user to use. Who dis? πŸ‘€
  • --warnings-as-errors=false β€” Treat warnings received from the server as errors and exit with a non-zero exit code. Dramatic? Maybe. Effective? Absolutely. πŸ’€

πŸŽ€ EXAMPLE πŸŽ€

Okay, classic move:

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

See? Effortless. She ate and left no crumbs. πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– HISTORY πŸ’–

June 2016, Ported from the Kubernetes man-doc generator. She's been serving looks since 2016, and she's still iconic. πŸ’…βœ¨


This manual page is from June 2016, ported from the Kubernetes man-doc generator. Brought to you by the Openshift CLI User Manuals. Stay slay, bestie. πŸ«ΆπŸ’–πŸŒˆ

πŸ“¦ where this page comes from