I am trying to deploy our created docker image using terrafrom on local kubernetes (k3s). Also creating a service using nginx_ingress. While doing terraform apply getting error. Whatever information I have searched on net it looks like versioning issue but my kuberenetes version is up to date. Terrafrom version is also fine. Please help me to resolve this issue.
Error details are as below -
$ terraform apply --auto-approve
kubernetes_deployment.eve-statedb-deploy: Creating...
kubernetes_horizontal_pod_autoscaler.eve-statedb-hpa: Creating...
kubernetes_secret.eve-statedb-config: Creating...
kubernetes_secret.ghcr-cred: Creating...
Error: the server could not find the requested resource (post secrets)
Error: Failed to create deployment: the server could not find the requested resource (post deployments.apps)
Error: the server could not find the requested resource (post secrets)
Error: the server could not find the requested resource (post horizontalpodautoscalers.autoscaling)
Version information : -
$ sudo kubectl version --short
Client Version: v1.20.0+k3s2
Server Version: v1.20.0+k3s2
$ terraform --version
Terraform v0.13.6
+ provider registry.terraform.io/hashicorp/kubernetes v2.0.1