From 7309304cedfc5b2241b26e4c73339340712a3b03 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Fri, 24 May 2019 16:21:05 -0500 Subject: [PATCH] Add note about external services --- slides/k8s/kubectlexpose.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/slides/k8s/kubectlexpose.md b/slides/k8s/kubectlexpose.md index 124ef922..baa7f3f5 100644 --- a/slides/k8s/kubectlexpose.md +++ b/slides/k8s/kubectlexpose.md @@ -276,3 +276,21 @@ error: the server doesn't have a resource type "endpoint" - There is no `endpoint` object: `type Endpoints struct` - The type doesn't represent a single endpoint, but a list of endpoints + +--- + +## Exposing services to the outside world + +- The default type (ClusterIP) only works for internal traffic + +- If we want to accept external traffic, we can use one of these: + + - NodePort (expose a service on a TCP port between 30000-32768) + + - LoadBalancer (provision a cloud load balancer for our service) + + - ExternalIP (use one node's external IP address) + + - Ingress (a special mechanism for HTTP services) + +*We'll see NodePorts and Ingresses more in detail later.*