Base64-Encoded Kubeconfig¶
Use a base64-encoded kubeconfig for local development or environments where an environment variable is not practical. This method is not recommended for production because the credential is long-lived and manually rotated.
Note
This method requires server.useBearerToken: false in your Helm values.
Encode Your Kubeconfig¶
Create the Credentials File¶
Create ~/.terraform.d/credentials.tfrc.json and replace the placeholder with the contents of /tmp/kubeconfig.b64:
Restrict the file permissions:
OpenTofu and Terraform read this file automatically when they contact the registry.