better readability
This commit is contained in:
parent
396e4dd196
commit
07febe44c0
25
README.md
25
README.md
@ -48,19 +48,23 @@ 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`
|
||||
|
||||
`k3d create --api-port 6550 --publish 8081:80 --workers 2`
|
||||
|
||||
2. Get the kubeconfig file
|
||||
`export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"`
|
||||
|
||||
`export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"`
|
||||
|
||||
3. Create a nginx deployment
|
||||
`kubectl create deployment nginx --image=nginx`
|
||||
|
||||
`kubectl create deployment nginx --image=nginx`
|
||||
|
||||
4. Create a ClusterIP service for it
|
||||
`kubectl create service clusterip nginx --tcp=80:80`
|
||||
|
||||
`kubectl create service clusterip nginx --tcp=80:80`
|
||||
|
||||
5. Create an ingress object for it with `kubectl apply -f`
|
||||
|
||||
@ -82,12 +86,14 @@ Example Workflow: Create a new cluster and use it with `kubectl`
|
||||
```
|
||||
|
||||
6. Curl it via localhost
|
||||
`curl localhost:8081/`
|
||||
|
||||
### via NodePort
|
||||
`curl localhost:8081/`
|
||||
|
||||
#### 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`
|
||||
|
||||
`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/`
|
||||
|
||||
`curl localhost:8082/`
|
||||
|
Loading…
Reference in New Issue
Block a user