OC-CREATE-DEPLOYMENT(1)
πΈ oc create deployment β bestie edition πΈ
okay so this is the oc create deployment manpage, from the Openshift CLI User Manuals (June 2016 energy, but the vibes are eternal). no cap, this page has everything you need to spin up a deployment, and yes, that includes all 1000 inherited flags. i got you. π
β¨ NAME β¨
oc create deployment β creates a deployment with whatever name you give it, periodt.
π SYNOPSIS π
oc create deployment [OPTIONS]
that's literally it. short. iconic. main character energy. β¨
π¦ DESCRIPTION π¦
so like, this command creates a deployment with a specific name. that's the whole thing. ngl it's a whole vibe β you tell it the name, it makes the deployment happen. slay. π
π OPTIONS π
buckle up bestie, there's a lot here. i'm gonna walk you through every single one, no cap.
--allow-missing-template-keys=trueβ if this istrue, it'll ignore any errors in templates when a field or map key is missing. only applies togolangandjsonpathoutput formats. lowkey a lifesaver when your template is being dramatic. π--dry-run="none"β must benone,server, orclient. if it's aclientstrategy, it only prints the object that would be sent, without actually sending it β like a trial run, no commitment. if it'sserverstrategy, it submits a server-side request without persisting the resource. fr fr, super useful for vibe-checking before you commit. β¨--field-manager="kubectl-create"β the name of the manager used to track field ownership. it's giving project management energy. π--image=[]β image names to run. a deployment can have multiple images set for a multi-container pod. so yes, you can have multiple containers in one pod. iconic. π«Ά-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 aesthetic. π--port=-1β thecontainerPortthat this deployment exposes. it's the port on the container, bestie. don't get it twisted. π₯-r,--replicas=1β number of replicas to create. default is1. so if you want more of the same thing (and honestly, who doesn't), this is your flag. π--save-config=falseβ iftrue, the configuration of the current object will be saved in its annotation. otherwise, the annotation stays unchanged. this flag is useful when you want to performkubectl applyon this object in the future. basically future-proofing. iykyk. π--show-managed-fields=falseβ iftrue, it keeps themanagedFieldswhen printing objects inJSONorYAMLformat. for the detail-obsessed besties. β--template=""β template string or path to a 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]. fancy. π--validate="ignore"β must be one of:strict(ortrue),warn,ignore(orfalse)."true"or"strict"will use a schema to validate the input and fail the request if it's invalid. it'll perform server-side validation ifServerSideFieldValidationis 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. ngl,ignoreis the "whatever happens, happens" option. π
πΈ OPTIONS INHERITED FROM PARENT COMMANDS πΈ
okay so these are the flags that come from the parent command. yes, all of them. i'm not skipping a single one, bestie. π«Ά
--as=""β username to impersonate for the operation. user could be a regular user or a service account in a namespace. it's giving "be someone else for a sec" energy. π--as-group=[]β group to impersonate for the operation. this flag can be repeated to specify multiple groups. so you can be in multiple groups at once. slay. β¨--as-uid=""β UID to impersonate for the operation. for when you need to be very specific about who you're being. π--as-user-extra=[]β user extras to impersonate for the operation. this flag can be repeated to specify multiple values for the same key. extra. literally. π--cache-dir="/homeless-shelter/.kube/cache"β default cache directory. yes, it sayshomeless-shelter. no, i don't know why. it's just the default, okay? π--certificate-authority=""β path to a cert file for the certificate authority. for security girlies. π₯--client-certificate=""β path to a client certificate file for TLS. more security. more TLS. π--client-key=""β path to a client key file for TLS. the key to the TLS kingdom. β--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β iftrue, opt-out of response compression for all requests to the server. for when you want it raw. no compression. π--insecure-skip-tls-verify=falseβ iftrue, the server's certificate will not be checked for validity. this will make your HTTPS connections insecure. β οΈ do not use this unless you absolutely have to, bestie. it's literally insecure. β οΈ--kubeconfig=""β path to the kubeconfig file to use for CLI requests. where's your config at? π¦--kuberc=""β path to thekubercfile to use for preferences. this can be disabled by exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=off. so many ways to turn it off. π--match-server-version=falseβ require server version to match client version. for when you need them to be in sync. fr fr. β¨-n,--namespace=""β if present, the namespace scope for this CLI request. put it in its place. π--profile="none"β name of profile to capture. one of(none|cpu|heap|goroutine|threadcreate|block|mutex). for the performance girlies. π--profile-output="profile.pprof"β name of the file to write the profile to.profile.pprofis the default. iconic. π--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 means forever, bestie. πΈ-s,--server=""β the address and port of the Kubernetes API server. where's the server at? π«Ά--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. defaults are cute. π₯--token=""β bearer token for authentication to the API server. your ticket in. π--user=""β the name of the kubeconfig user to use. who are you today? β--warnings-as-errors=falseβ treat warnings received from the server as errors and exit with a non-zero exit code. so if the server is like "hey just a warning," you're like "nope, that's an error." dramatic but valid. π
π EXAMPLE π
okay so here are the examples. they're literally so good. i'm obsessed. π
# Create a deployment named my-dep that runs the busybox image
oc create deployment my-dep --image=busybox
# Create a deployment with a command
oc create deployment my-dep --image=busybox -- date
# Create a deployment named my-dep that runs the nginx image with 3 replicas
oc create deployment my-dep --image=nginx --replicas=3
# Create a deployment named my-dep that runs the busybox image and expose port 5701
oc create deployment my-dep --image=busybox --port=5701
# Create a deployment named my-dep that runs multiple containers
oc create deployment my-dep --image=busybox:latest --image=ubuntu:latest --image=nginx
the last one? multiple containers in one deployment. it's giving "i contain multitudes." π¦
π SEE ALSO π
that's the only one listed, bestie. but it's a good one. go check it out. β¨
β HISTORY β
June 2016, Ported from the Kubernetes man-doc generator. so it's old but it's still relevant. vintage. iconic. periodt. π
anyway, that's the whole page. every flag, every detail, every vibe. you're welcome, bestie. now go create some deployments and slay. πβ¨ππ¦πΈπ π«Άππ₯ππβππππ§π
β Openshift CLI User Manuals, June 2016. fr fr. π
π¦ 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