Difference between revisions of "Kubectl create clusterip"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 22: | Line 22: | ||
* <code>[[kubectl get service]] | grep ClusterIP</code> | * <code>[[kubectl get service]] | grep ClusterIP</code> | ||
* <code>[[provided IP is already allocated]]</code> | * <code>[[provided IP is already allocated]]</code> | ||
− | + | * [[Port forward]]: [[kubectl port-forward]] | |
== See also == | == See also == |
Latest revision as of 14:38, 29 June 2023
kubectl create service clusterip
apiVersion: v1 kind: Service metadata: name: my-service spec: selector: app.kubernetes.io/name: MyApp ports: - protocol: TCP port: 80 targetPort: 9376
- https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-service-clusterip-em-
- https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
ClusterIP
(default ServiceType): exposes the Service on a cluster internal IP then your service is only reachable from within the cluster.kubectl get service | grep ClusterIP
provided IP is already allocated
- Port forward: kubectl port-forward
See also[edit]
Advertising: