- It isn't an autogenerated wrapper around the k8s API, so not 100% of features are supported. E.g. there has been an open issue to implement setting runtimeClass on workload resources for three years.
- All of the options on the Terraform resources have been converted from camel-case to snake-case, which is fine except that I always forget to do that conversion when working off of the k8s API reference or an example. Some of them have also been converted from plural to singular.
- Because of the heavy use of Terraform blocks for configuring resources, it's often annoying to reuse chunks of configuration across resources or use non-trivial variables in the configuration -- and that's the big reason I wanted to use something like Terraform (versus flux or similar) in the first place.
- The k8s provider does actually have a way to manage custom resources now, the kubernetes_manifest resource type, but it requires writing the whole resource manifest out in HCL.
In short, there are better approaches and I would recommend against it. But hey, I'm just some guy on the internet.
"When using interpolation to pass credentials to the Kubernetes provider from other resources, these resources SHOULD NOT be created in the same Terraform module where Kubernetes provider resources are also used . This will lead to intermittent and unpredictable errors which are hard to debug and diagnose. The root issue lies with the order in which Terraform itself evaluates the provider blocks vs. actual resources."
I'd recommend some solution such as argocd, flux, or if you're using a cloud provider such as azure they have automated deployments for k8s applications onto clusters (I'm sure aws has something similar).
https://aws.amazon.com/blogs/containers/bootstrapping-cluste...
https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/...