explicit kubectl commands

This commit is contained in:
Dominik Chilla 2020-08-23 21:20:36 +02:00
parent 73a5ebab6c
commit a948a15fbd

View File

@ -32,7 +32,7 @@ Finally `systemctl daemon-reload` and `systemctl restart k3s`
https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal
### Change service type from NodePort to LoadBalancer <a name="nginx-ingress-loadbalancer"></a>
`kubectl edit service -n ingress-nginx` and change `type: NodePort` to `type: LoadBalancer`
`kubectl edit service -n ingress-nginx ingress-nginx-controller` and change `type: NodePort` to `type: LoadBalancer`
Port 80 and 443 should listen now on an *External-IP* `kubectl get all --all-namespaces`:
```
@ -58,7 +58,7 @@ dominik@muggler:~$ curl -s http://10.62.94.246
### Enable nginx-ingress tcp- and udp-services for apps other than http/s <a name="nginx-ingress-tcp-udp-enabled"></a>
Docs: https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/
`kubectl edit deployment -n ingress-nginx` and search for `spec:`/`template`/`spec`/`containers` section:
`kubectl edit deployment -n ingress-nginx ingress-nginx-controller` and search for `spec:`/`template`/`spec`/`containers` section:
```
[...]
spec:
@ -89,7 +89,7 @@ spec:
```
## Enable client-IP transparency and expose TCP-port 9000 <a name="enable-client-ip-transp-expose-tcp-9000"></a>
Enable client-IP transparency and expose my-nginx app on nginx-ingress TCP-port 9000: `kubectl edit service -n ingress-nginx`
Enable client-IP transparency and expose my-nginx app on nginx-ingress TCP-port 9000: `kubectl edit service -n ingress-nginx ingress-nginx-controller`
Find the `ports:`-section of the `ingress-nginx-controller` service and *ADD* the definition for port 9000:
```
[...]