Difference between revisions of "Kubectl expose"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
<code>[[kubectl expose deployment]] nginxapp --name=nginxclusterip --port=80 --target-port=8080</code> | <code>[[kubectl expose deployment]] nginxapp --name=nginxclusterip --port=80 --target-port=8080</code> | ||
+ | |||
+ | kubectl expose rc nginx --port=80 --target-port=8000 | ||
+ | https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources | ||
== Related == | == Related == |
Revision as of 17:07, 1 December 2022
kubectl expose
take a replication controller, service, replica set or pod and expose it as a new Kubernetes Service
kubectl expose deployment nginxapp --name=nginxclusterip --port=80 --target-port=8080
kubectl expose rc nginx --port=80 --target-port=8000 https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources
Related
See also
Advertising: