better readability

This commit is contained in:
iwilltry42 2019-05-15 08:40:48 +02:00
parent 396e4dd196
commit 07febe44c0

View File

@ -48,18 +48,22 @@ Example Workflow: Create a new cluster and use it with `kubectl`
### Expose services
#### via Ingress
#### 1. via Ingress
1. Create a cluster, mapping the ingress port 80 to localhost:8081
`k3d create --api-port 6550 --publish 8081:80 --workers 2`
2. Get the kubeconfig file
`export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"`
3. Create a nginx deployment
`kubectl create deployment nginx --image=nginx`
4. Create a ClusterIP service for it
`kubectl create service clusterip nginx --tcp=80:80`
5. Create an ingress object for it with `kubectl apply -f`
@ -82,11 +86,13 @@ Example Workflow: Create a new cluster and use it with `kubectl`
```
6. Curl it via localhost
`curl localhost:8081/`
### via NodePort
#### 2. via NodePort
1. Create a cluster, mapping the port 30080 from worker-0 to localhost:8082
`k3d create --publish 8082:30080@k3d-k3s-default-worker-0 --workers 2 -a 6550`
... (Steps 2 and 3 like above) ...
@ -113,4 +119,5 @@ Example Workflow: Create a new cluster and use it with `kubectl`
```
5. Curl it via localhost
`curl localhost:8082/`