2020-04-25 19:03:46 +00:00
|
|
|
resource "scaleway_k8s_cluster_beta" "k8s-cluster" {
|
|
|
|
name = "cluster-fun"
|
|
|
|
description = ""
|
2021-12-24 09:20:11 +00:00
|
|
|
version = "1.23.0"
|
2020-04-25 19:03:46 +00:00
|
|
|
cni = "weave"
|
|
|
|
enable_dashboard = false
|
2021-10-16 08:46:06 +00:00
|
|
|
ingress = "nginx"
|
2020-04-25 19:03:46 +00:00
|
|
|
|
|
|
|
feature_gates = [
|
2021-12-24 09:20:11 +00:00
|
|
|
"HPAScaleToZero"
|
2020-04-25 19:03:46 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-05-02 09:58:55 +00:00
|
|
|
resource "scaleway_k8s_pool_beta" "k8s-cluster-pool-1" {
|
2020-05-02 20:46:36 +00:00
|
|
|
cluster_id = scaleway_k8s_cluster_beta.k8s-cluster.id
|
|
|
|
name = "node pool 1"
|
|
|
|
node_type = "DEV1-M"
|
2020-05-25 13:20:46 +00:00
|
|
|
size = 1
|
2020-05-02 20:46:36 +00:00
|
|
|
min_size = 1
|
2020-06-07 13:21:10 +00:00
|
|
|
max_size = 3
|
2020-05-02 09:58:55 +00:00
|
|
|
autoscaling = true
|
|
|
|
autohealing = true
|
2020-06-05 17:29:05 +00:00
|
|
|
|
|
|
|
lifecycle {
|
|
|
|
ignore_changes = [size]
|
|
|
|
}
|
2020-05-02 09:58:55 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 19:03:46 +00:00
|
|
|
output "api_server" {
|
|
|
|
value = scaleway_k8s_cluster_beta.k8s-cluster.apiserver_url
|
|
|
|
}
|
|
|
|
|
|
|
|
output "wildcard_dns" {
|
|
|
|
value = scaleway_k8s_cluster_beta.k8s-cluster.wildcard_dns
|
|
|
|
}
|
|
|
|
|
|
|
|
output "kubeconfig" {
|
2020-05-02 10:11:59 +00:00
|
|
|
value = scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].config_file
|
2020-04-25 19:03:46 +00:00
|
|
|
}
|