terraform-iaac / terraform-kubernetes-cert-manager

Terraform module for Kubernetes Cert Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: cert-manager failed to create kubernetes rest client for update of resource: resource [cert-manager.io/v1/ClusterIssuer] isn't valid for cluster, check the APIVersion and Kind fields are valid

datenzar opened this issue · comments

Hi there,

I have an eks-cluster deployed and upon applying this module. I receive this error:

│ Error: cert-manager failed to create kubernetes rest client for update of resource: resource [cert-manager.io/v1/ClusterIssuer] isn't valid for cluster, check the APIVersion and Kind fields are valid

│ with module.cert_manager.kubectl_manifest.cluster_issuer[0],
│ on .terraform/modules/cert_manager/main.tf line 42, in resource "kubectl_manifest" "cluster_issuer":
│ 42: resource "kubectl_manifest" "cluster_issuer" {

To solve the issue, I can deactivate the issuer creation cluster_issuer_create = false and apply a ClusterIssuer in a second step (due to dependency constraints, like discussed here).

Any chance that I can get this module working as planned?

Hello @datenzar , i guess you don't have configuration for kubectl custom provider which is used by this module.

I've updated readme, how to configure kubectl provider.

A note for fools like me who find this thread and can't figure out what's wrong with their kubectl provider config: RTFM

Note: Unlike the Terraform Kubernetes Provider, this provider will load the KUBECONFIG file if the environment variable is set.

Use load_config_file = false to prevent it from loading the KUBECONFIG (despite the host/ca/token arguments already being set)