From 86b25cff23bc7b39d0eb155c1f59621da585672d Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Mon, 11 May 2020 11:03:43 +0200 Subject: [PATCH] docs: add 'loadbalancer' filter to 'Exposing Services/1. via Ingress' section --- docs/usage/guides/exposing_services.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/usage/guides/exposing_services.md b/docs/usage/guides/exposing_services.md index 38e1d583..01a826bf 100644 --- a/docs/usage/guides/exposing_services.md +++ b/docs/usage/guides/exposing_services.md @@ -7,9 +7,14 @@ Therefore, we have to create the cluster in a way, that the internal port 80 (wh 1. Create a cluster, mapping the ingress port 80 to localhost:8081 - `k3d create cluster --api-port 6550 -p 8081:80 --workers 2` - - - Note: `--api-port 6550` is not required for the example to work. It's used to have `k3s`'s API-Server listening on port 6550 with that port mapped to the host system. + `k3d create cluster --api-port 6550 -p 8081:80@loadbalancer --workers 2` + + !!! note "NOTE" + - `--api-port 6550` is not required for the example to work. It's used to have `k3s`'s API-Server listening on port 6550 with that port mapped to the host system. + - the port-mapping construct `8081:80@loadbalancer` means + - map port `8081` from the host to port `80` on the container which matches the nodefilter `loadbalancer` + - the `loadbalancer` nodefilter matches only the `masterlb` that's deployed in front of a cluster's master nodes + - all ports exposed on the `masterlb` will be proxied to the same ports on all master nodes in the cluster 2. Get the kubeconfig file