| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung |
| en:modul:m321_aws:topics:08 [2025/10/22 16:29] – dgaravaldi | en:modul:m321_aws:topics:08 [2025/10/22 16:32] (aktuell) – dgaravaldi |
|---|
| * ''NodePort'': Exposes the service on the same port of each cluster node. In other words, each physical machine (which is a Kubernetes node) opens a port that is forwarded to the service. Then, you can access it by using ''<NODE-IP>:<NODE-PORT>''. | * ''NodePort'': Exposes the service on the same port of each cluster node. In other words, each physical machine (which is a Kubernetes node) opens a port that is forwarded to the service. Then, you can access it by using ''<NODE-IP>:<NODE-PORT>''. |
| * ''LoadBalancer'': Creates an external load balancer and assigns a separate external IP for the service. Your Kubernetes cluster must support external load balancers, which works fine in the case of cloud platforms, but may not work if you use minikube. | * ''LoadBalancer'': Creates an external load balancer and assigns a separate external IP for the service. Your Kubernetes cluster must support external load balancers, which works fine in the case of cloud platforms, but may not work if you use minikube. |
| * ''ExternalName: Exposes the service using a DNS name (specified by externalName in the spec). | * ''ExternalName'': Exposes the service using a DNS name (specified by externalName in the spec). |
| |
| While LoadBalancer seems to be the simplest solution, it has two drawbacks: | While LoadBalancer seems to be the simplest solution, it has two drawbacks: |
| * It's not always available, for example, if you deployed on-premises Kubernetes or used minikube. | * It's not always available, for example, if you're using minikube. |
| * External public IPs are usually expensive. A different solution is to use a NodePort service. | * External public IPs are usually expensive. A different solution is to use a ''NodePort'' service. |
| |
| <code> | <code> |