Closed grieshaber closed 2 years ago
@grieshaber Is this a sequencing issue where we are trying to access the CM before it is created or is the kube-dns
CM not in the cluster at all? Could you post a complete sample config I can use to reproduce?
/cc @apeabody who touched this recently incase you had any thoughts.
@grieshaber Thanks for reaching out, can you also let us know the version of your Kubernetes Provider? e.g 2.11.0?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
@grieshaber Is this a sequencing issue where we are trying to access the CM before it is created or is the
kube-dns
CM not in the cluster at all? Could you post a complete sample config I can use to reproduce? /cc @apeabody who touched this recently incase you had any thoughts.
Seeing the exact same issue for a brand new cluster setup using module :
source = "terraform-google-modules/kubernetes-engine/google//modules/beta-private-cluster-update-variant"
version = "23.3.0"
and following providers : kubernetes v2.15.0 random v3.4.3 google v4.43.1
kube-dns
CM exists in the cluster in the kube-sytem
ns
@grieshaber what did you end up doing here ?
I'm also seeing this error.
Terraform Version: v1.4.6
Module Version: v26.1.1
Providers Versions:
I also see this error, but it's on already created cluster. I added just upstream_nameservers
option to the module invocation.
Terraform v1.3.9 on linux_amd64
module.gke_dev-v2.kubernetes_config_map_v1_data.kube-dns-upstream-namservers[0]: Creating...
╷
│ Error: The configmap "kube-dns" does not exist
│
│ with module.gke_dev-v2.kubernetes_config_map_v1_data.kube-dns-upstream-namservers[0],
│ on .terraform/modules/gke_dev-v2/modules/beta-private-cluster/dns.tf line 45, in resource "kubernetes_config_map_v1_data" "kube-dns-upstream-namservers":
│ 45: resource "kubernetes_config_map_v1_data" "kube-dns-upstream-namservers" {
│
╵
The ConfigMap is present in cluster
k get cm -n kube-system kube-dns -o yaml
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: "2022-04-04T10:02:38Z"
labels:
addonmanager.kubernetes.io/mode: EnsureExists
name: kube-dns
namespace: kube-system
resourceVersion: "384016010"
uid: bdee174a-23a4-4571-bcad-b20a0cc838da
TL;DR
Creating a new cluster with this module and configuring the use of stub_domains fails with:
Expected behavior
The kube-dns config-map will be adapted properly, right after the cluster and node-pool are provisionend successfully.
Observed behavior
Adaption of the configMap fails because terraform fails accessing the actual configMap within the cluster.
Terraform Configuration
Terraform Version
Additional information
No response