OC-CREATE-SERVICE-LOADBALANCER(1)
π oc create service loadbalancer, bestie
okay so real talk, this page is from the OpenShift CLI User Manuals set (yeah, the oc ones), and it's all about conjuring a LoadBalancer service out of thin air. June 2016 energy, but the info still hits. let's go π«Ά
β¨ NAME β¨
oc create service loadbalancer β bestie, it literally creates a LoadBalancer service. that's the whole vibe. π
πΈ SYNOPSIS πΈ
oc create service loadbalancer [OPTIONS]
π¦ DESCRIPTION π¦
You make a LoadBalancer service, and you give it the name you want. that's it, that's the function. iconic, low maintenance, does exactly what it says. π
β OPTIONS β
--allow-missing-template-keys=trueβ when this istrue, any errors that pop up in templates (specifically when a field or map key is missing from the template) just get ignored, no drama. heads up though: this only applies togolangandjsonpathoutput formats. only those two, iykyk.--dry-run="none"β must be"none","server", or"client". if you pick the client strategy, it only prints the object that would've been sent β nothing actually gets sent. if you pick the server strategy, it submits a server-side request without persisting the resource. so like, a vibe check without the commitment. π--field-manager="kubectl-create"β the name of the manager that's used to track field ownership. yes, the default iskubectl-create, notoc-something, don't come for me. π-o,--output=""β the 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β iftrue, the configuration of the current object gets saved in its annotation. otherwise the annotation stays exactly as it was. and ngl this flag is genuinely useful when you're planning to runkubectl applyon this object later. future you says thanks. π--show-managed-fields=falseβ iftrue, it keeps themanagedFieldswhen printing objects in JSON or YAML format. otherwise those fields get hidden.--tcp=[]β port pairs can be specified as'<port>:<targetPort>'. simple as that.--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, over at β¨http://golang.org/pkg/text/template/#pkg-overviewβ©.--validate="ignore"β must be one of:strict(ortrue),warn,ignore(orfalse). let me break it down:"true"or"strict"uses a schema to validate the input and fails the request if it's invalid. it performs server side validation ifServerSideFieldValidationis enabled on the api-server β but if it's not, it falls back to less reliable client-side validation. β οΈ"warn"warns you about unknown or duplicate fields without blocking the request β but only if server-side field validation is enabled on the API server. otherwise it behaves like"ignore"."false"or"ignore"performs no schema validation at all, and silently drops any unknown or duplicate fields. literally silently. π
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
these come from the parent command, so they're the whole family's vibes, not just this one. π
--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. 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. yes that's the real path, no I'm not joking. π--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. > bestie this literally makes your HTTPS connections insecure. proceed with intention. π--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 by turning off the feature withKUBERC=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 the 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 β it'll just wait forever, patiently, like a true bestie. β¨-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 instead.--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. harsh but fair. π
π EXAMPLE π
# Create a new LoadBalancer service named my-lbs
oc create service loadbalancer my-lbs --tcp=5678:8080
look at her go. π
π SEE ALSO π
(and that's the only friend on the list, but she's a good one π«Ά)
π HISTORY π
June 2016, Ported from the Kubernetes man-doc generator. vintage. antique. still slaying. π
k that's the whole page, no cap π this was OpenShift CLI User Manuals, dated June 2016, ported from the Kubernetes man-doc generator β and yeah, the header and footer said exactly that too. now go create some load balancers, bestie. πΈ
π¦ 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