Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
Add nginx ingress controller example configuration (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj authored Oct 6, 2021
1 parent 07b8abb commit a28826d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/resources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,43 @@ resource "kind_cluster" "default" {
}
```

To configure the cluster for nginx's ingress controller based on [kind's docs](https://kind.sigs.k8s.io/docs/user/ingress/):

```hcl
provider "kind" {}
resource "kind_cluster" "default" {
name = "test-cluster"
wait_for_ready = true
kind_config {
kind = "Cluster"
api_version = "kind.x-k8s.io/v1alpha4"
node {
role = "control-plane"
kubeadm_config_patches = [
"kind: InitConfiguration\nnodeRegistration:\n kubeletExtraArgs:\n node-labels: \"ingress-ready=true\"\n"
]
extra_port_mappings {
container_port = 80
host_port = 80
}
extra_port_mappings {
container_port = 443
host_port = 443
}
}
node {
role = "worker"
}
}
}
```

To override the default kind config:

```hcl
Expand Down

0 comments on commit a28826d

Please sign in to comment.