OC-CREATE-INGRESS(1)
π OC-CREATE-INGRESS(1) β oc create ingress, bestie π
okay so welcome to the oc create ingress page from the OpenShift CLI User Manuals, manual name OC-CREATE-INGRESS(1). Itβs giving βmake an ingress with the specified name,β and honestly? slay. π
β¨ NAME β¨
oc create ingress β create an ingress with the specified name. periodt. π
π¦ SYNOPSIS π¦
oc create ingress [OPTIONS]
πΈ DESCRIPTION πΈ
Create an ingress with the specified name. thatβs the whole vibe. no cap, itβs a little command with a lot of main-character energy. β¨
π OPTIONS π
--allow-missing-template-keys=trueβ iftrue, ignore any errors in templates when a field or map key is missing in the template. Only applies togolangandjsonpathoutput formats. π«Ά--annotation=[]β annotation to insert in the ingress object, in the formatannotation=value. π--class=""β Ingress Class to be used. π--default-backend=""β default service for backend, in format ofsvcname:port. π--dry-run="none"β must be"none","server", or"client". Ifclientstrategy, only print the object that would be sent, without sending it. Ifserverstrategy, submit server-side request without persisting the resource. π--field-manager="kubectl-create"β name of the manager used to track field ownership. π§-o, --output=""β output format. One of:(json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). π--rule=[]β rule in formathost/path=service:port[,tls=secretname]. Paths containing the leading character'*'are consideredpathType=Prefix.tlsargument is optional. π₯--save-config=falseβ iftrue, 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 performkubectl applyon this object in the future. π--show-managed-fields=falseβ iftrue, keep themanagedFieldswhen printing objects in JSON or YAML format. π--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β©]. π--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 invalid. It will 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. π
π«Ά real talk:--rulepaths with the leading*are consideredpathType=Prefix, and thetlsargument is optional. iykyk.
𧬠OPTIONS INHERITED FROM PARENT COMMANDS π§¬
--as=""β username to impersonate for the operation. User could be a regular user or a service account in a namespace. π€--as-group=[]β group to impersonate for the operation, this flag can be repeated to specify multiple groups. π―--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="/homeless-shelter/.kube/cache"β 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β iftrue, opt-out of response compression for all requests to the server. π¦--insecure-skip-tls-verify=falseβ iftrue, the serverβs certificate will not be checked for validity. This will make your HTTPS connections insecure. π--kubeconfig=""β path to the kubeconfig file to use for CLI requests. π--kuberc=""β path to the kuberc file to use for preferences. This can be disabled by exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=off. βοΈ--match-server-version=falseβ require server version to match client version. πͺ-n, --namespace=""β if present, the namespace scope for this CLI request. π·οΈ--profile="none"β name of profile to capture. One of(none|cpu|heap|goroutine|threadcreate|block|mutex). π--profile-output="profile.pprof"β name of the file to write the profile to. πΎ--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. β³-s, --server=""β the address and port of the Kubernetes API server. π°οΈ--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. π§--token=""β bearer token for authentication to the API server. ποΈ--user=""β the name of the kubeconfig user to use. π--warnings-as-errors=falseβ treat warnings received from the server as errors and exit with a non-zero exit code. π¨
π EXAMPLE π
bestie, these are the exact examples. copy-paste responsibly. π
# Create a single ingress called 'simple' that directs requests to foo.com/bar to svc
# svc1:8080 with a TLS secret "my-cert"
oc create ingress simple --rule="foo.com/bar=svc1:8080,tls=my-cert"
# Create a catch all ingress of "/path" pointing to service svc:port and Ingress Class as "otheringress"
oc create ingress catch-all --class=otheringress --rule="/path=svc:port"
# Create an ingress with two annotations: ingress.annotation1 and ingress.annotations2
oc create ingress annotated --class=default --rule="foo.com/bar=svc:port" \
--annotation ingress.annotation1=foo \
--annotation ingress.annotation2=bla
# Create an ingress with the same host and multiple paths
oc create ingress multipath --class=default \
--rule="foo.com/=svc:port" \
--rule="foo.com/admin/=svcadmin:portadmin"
# Create an ingress with multiple hosts and the pathType as Prefix
oc create ingress ingress1 --class=default \
--rule="foo.com/path*=svc:8080" \
--rule="bar.com/admin*=svc2:http"
# Create an ingress with TLS enabled using the default ingress certificate and different path types
oc create ingress ingtls --class=default \
--rule="foo.com/=svc:https,tls" \
--rule="foo.com/path/subpath*=othersvc:8080"
# Create an ingress with TLS enabled using a specific secret and pathType as Prefix
oc create ingress ingsecret --class=default \
--rule="foo.com/*=svc:8080,tls=secret1"
# Create an ingress with a default backend
oc create ingress ingdefault --class=default \
--default-backend=defaultsvc:http \
--rule="foo.com/*=svc:8080,tls=secret1"
π¦ SEE ALSO π¦
oc-create(1), β yes, with the comma, bestie. keep it cute. π
πΈ HISTORY πΈ
June 2016, Ported from the Kubernetes man-doc generator. iconic origin story, honestly. π
k bye bestie π β source/version: Openshift, Openshift CLI User Manuals; date: June 2016; page: OC CREATE(1). β¨
π¦ 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