Difference between revisions of "Exposing an External IP Address to Access an Application in a Cluster"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
* https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/ | * https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/ | ||
− | [[kubectl expose deployment]] | + | [[kubectl expose deployment]] [[your-deployment-name]] [[--type]]=[[LoadBalancer]] --name=my-service |
+ | service/my-service exposed | ||
+ | [[kubectl get services]] my-service | ||
+ | NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
+ | my-service LoadBalancer 172.20.165.35 a44a5217784174123143443.us-east-1.elb.amazonaws.com 3000:31896/TCP 19s | ||
− | {{K8s net}} | + | == Related == |
+ | * [[Kubernetes ingress]] | ||
+ | |||
+ | == See also == | ||
+ | * {{K8s net}} | ||
+ | |||
+ | [[Category:K8s]] |
Latest revision as of 19:19, 27 March 2023
kubectl expose deployment your-deployment-name --type=LoadBalancer --name=my-service service/my-service exposed
kubectl get services my-service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service LoadBalancer 172.20.165.35 a44a5217784174123143443.us-east-1.elb.amazonaws.com 3000:31896/TCP 19s
Related[edit]
See also[edit]
- Kubernetes networking: network policies, Network Policy Providers, CNI, Calico, flannel, Service mesh, Istio,
kube-proxy, coredns, AWS VPC CNI: vpc-cni
, Kubernetes: Ingress controllers, IPVS, ServiceTypes:LoadBalancer, ClusterIP, NodePort, ExternalName
, Endpoints, EndpointSlices, Kubernetes DNS,svc.cluster.local
, Weave Net
Advertising: