mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-12-01 07:26:05 +07:00
added Kong ingress example
This commit is contained in:
@@ -23,6 +23,7 @@ by the ingress controller `nodeSelector`.
|
||||
2. Deploy an Ingress controller, the following ingress controllers are known to work:
|
||||
- [Ambassador](#ambassador)
|
||||
- [Contour](#contour)
|
||||
- [Ingress Kong](#ingress-kong)
|
||||
- [Ingress NGINX](#ingress-nginx)
|
||||
|
||||
### Create Cluster
|
||||
@@ -112,6 +113,51 @@ Refer to [Using Ingress](#using-ingress) for a basic example usage.
|
||||
|
||||
Additional information about Contour can be found at: [projectcontour.io](https://projectcontour.io)
|
||||
|
||||
### Ingress Kong
|
||||
|
||||
Deploy [Kong Ingress Controller (KIC)](https://docs.konghq.com/kubernetes-ingress-controller/2.1.x/concepts/design/).
|
||||
|
||||
{{< codeFromInline lang="bash" >}}
|
||||
kubectl apply -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-dbless.yaml
|
||||
{{< /codeFromInline >}}
|
||||
|
||||
Apply kind specific patches to forward the `hostPorts` to the ingress controller, set taint tolerations, and schedule it to the custom labeled node.
|
||||
|
||||
```json
|
||||
{{% readFile "static/examples/ingress/kong/deployment.patch.json" %}}
|
||||
```
|
||||
|
||||
Apply it by running:
|
||||
|
||||
{{< codeFromInline lang="bash" >}}
|
||||
kubectl patch deployment -n kong ingress-kong -p '{{< minify file="static/examples/ingress/kong/deployment.patch.json" >}}'
|
||||
{{< /codeFromInline >}}
|
||||
|
||||
Apply kind specific patch to change service type to `NodePort`:
|
||||
|
||||
```json
|
||||
{{% readFile "static/examples/ingress/kong/service.patch.json" %}}
|
||||
```
|
||||
|
||||
Apply it by running:
|
||||
|
||||
{{< codeFromInline lang="bash" >}}
|
||||
kubectl patch service -n kong ingress-kong -p '{{< minify file="static/examples/ingress/kong/service.patch.json" >}}'
|
||||
{{< /codeFromInline >}}
|
||||
|
||||
KIC can be used to configure ingress now.
|
||||
|
||||
You can try the example in [Using Ingress](#using-ingress) at this moment,
|
||||
but KIC will not automatically handle `Ingress` object defined there.
|
||||
`Ingress` resources must include `ingressClassName: kong` under `spec` of `Ingress` for being controlled by Kong Ingress Controller (it will be ignored otherwise).
|
||||
So once the example has been loaded, you can add this annotation with:
|
||||
|
||||
{{< codeFromInline lang="bash" >}}
|
||||
kubectl patch ingress example-ingress -p '{"spec":{"ingressClassName":"kong"}}'
|
||||
{{< /codeFromInline >}}
|
||||
|
||||
Refer [Using Ingress](#using-ingress) for primary example usage.
|
||||
|
||||
|
||||
### Ingress NGINX
|
||||
|
||||
|
||||
Reference in New Issue
Block a user