terraform-provider-flux
terraform-provider-flux copied to clipboard
Error: flux-system/source-controller failed to create kubernetes rest client for update of resource:
Error msg:
Error: flux-system/source-controller failed to create kubernetes rest client for update of resource: flux-system/source-controller timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["apps/v1/deployment/flux-system/source-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/kustomize-controller failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["apps/v1/deployment/flux-system/kustomize-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/kustomize-controller failed to create kubernetes rest client for update of resource: flux-system/kustomize-controller timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/serviceaccount/flux-system/kustomize-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: helmrepositories.source.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: helmrepositories.source.toolkit.fluxcd.io timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/helmrepositories.source.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: gitrepositories.source.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/gitrepositories.source.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/notification-controller failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/serviceaccount/flux-system/notification-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/source-controller failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/serviceaccount/flux-system/source-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: helmreleases.helm.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/helmreleases.helm.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/helm-controller failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/serviceaccount/flux-system/helm-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: receivers.notification.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/receivers.notification.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: crd-controller-flux-system failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["rbac.authorization.k8s.io/v1/clusterrolebinding/crd-controller-flux-system"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/namespace/flux-system"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: crd-controller-flux-system failed to create kubernetes rest client for update of resource: crd-controller-flux-system timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["rbac.authorization.k8s.io/v1/clusterrole/crd-controller-flux-system"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: buckets.source.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: buckets.source.toolkit.fluxcd.io timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/buckets.source.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: helmcharts.source.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host (Client.Timeout exceeded while awaiting headers)
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/helmcharts.source.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/source-controller failed to create kubernetes rest client for update of resource: flux-system/source-controller timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/service/flux-system/source-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/notification-controller failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/service/flux-system/notification-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: kustomizations.kustomize.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: initialing the device code authentication: autorest/adal/devicetoken: Error occurred while sending request for Device Authorization Code: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/devicecode": dial tcp 20.190.151.7:443: socket: too many open files
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/kustomizations.kustomize.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/helm-controller failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host
│
│ with module.banyan.module.flux.kubectl_manifest.install["apps/v1/deployment/flux-system/helm-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: providers.notification.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: providers.notification.toolkit.fluxcd.io timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/providers.notification.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/notification-controller failed to create kubernetes rest client for update of resource: flux-system/notification-controller timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["apps/v1/deployment/flux-system/notification-controller"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: cluster-reconciler-flux-system failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host (Client.Timeout exceeded while awaiting headers)
│
│ with module.banyan.module.flux.kubectl_manifest.install["rbac.authorization.k8s.io/v1/clusterrolebinding/cluster-reconciler-flux-system"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: flux-system/webhook-receiver failed to create kubernetes rest client for update of resource: Get "https://banyan-aks-dns-8512da58.hcp.eastus2.azmk8s.io:443/api?timeout=32s": acquiring a token for authorization header: acquiring a new fresh token: waiting for device code authentication to complete: autorest/adal/devicetoken: Error occurred while sending request with device code for a token: Post "https://login.microsoftonline.com/335a6d75-c3eb-4b1a-ac08-d49338816ca0/oauth2/token": dial tcp: lookup login.microsoftonline.com on 10.10.10.10:53: no such host (Client.Timeout exceeded while awaiting headers)
│
│ with module.banyan.module.flux.kubectl_manifest.install["v1/service/flux-system/webhook-receiver"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
│
╵
╷
│ Error: alerts.notification.toolkit.fluxcd.io failed to create kubernetes rest client for update of resource: alerts.notification.toolkit.fluxcd.io timed out fetching resources from discovery client
│
│ with module.banyan.module.flux.kubectl_manifest.install["apiextensions.k8s.io/v1/customresourcedefinition/alerts.notification.toolkit.fluxcd.io"],
│ on .terraform/modules/banyan/modules/kubernetes/flux/main.tf line 40, in resource "kubectl_manifest" "install":
│ 40: resource "kubectl_manifest" "install" {
Anyone who has managed to deploy flux using Terraform on an EKS cluster?
I am getting these for all the Flux manifest under install.
Error: flux-system/source-controller failed to create kubernetes rest client for update of resource: Get "https://kubernetes.docker.internal:6443/api?timeout=32s": dial tcp 127.0.0.1:6443: connect: connection refused
@winniegakuru this looks like your kubectl provider is not configured properly, and it is defaulting to localhost instead.
Yes yes... u r right.... Got it working