-
Notifications
You must be signed in to change notification settings - Fork 55
github.com/kbst/terraform-provider-kustomize/kustomize.kustomizationResourceCreate > timed out waiting for: <resource>: the server has asked for the client to provide credentials #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've used the provider with exec before. so I don't think it's that. And Does your kubeconfig work with kubectl? What happens if you call the command specified in the exec manually? |
FYI: Our Terraform code uses Kubernetes provider and Kustomize provider with the exact same Kubeconfig. The issue occurs only in the Kustomize provider.
Yes, it works. It works with Kubernetes provider as well.
I will recheck it and let you know. However, we have dozens of Kubernetes resources managed via Kubernetes provider, which works properly. I think it will work, but I will double check just to be sure. |
Yes, it works as expected. I have verified it and it works fine with the following tools:
It works and returns a valid token. Command is defined here: https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.29.4/oci_cli_docs/cmdref/ce/cluster/generate-token.html. Here (below) is an result example: {
"apiVersion": "client.authentication.k8s.io/v1beta1",
"kind": "ExecCredential",
"status": {
"token": "xxxxxxxxxxxxxxxxxxx",
"expirationTimestamp": "2023-07-20T07:26:27.953812Z"
}
} SUMMARY: We can totally exclude possible kubeconfig misconfiguration. Kubeconfig is definitely valid. |
For what it's worth - I'm seeing this issue now as well - with a kubectl generated by the aws cli. kubeconfig content``` apiVersion: v1 clusters: - cluster: certificate-authority-data: *** server: https://1.2.3.4 name: cluster_name_example contexts: - context: cluster: cluster_name_example user: user_name_example name: context_name_example current-context: context_name_example kind: Config preferences: {} users: - name: user_name_example user: exec: apiVersion: client.authentication.k8s.io/v1beta1 args: - --region - ap-southeast-2 - eks - get-token - --cluster-name - cluster_name_example - --output - json command: aws ```It's giving this error:
And the same as the other reporter it works fine with:
Versions:
Use case
|
If the CLI used in the exec part does error, I do not think this is an issue with the provider. I will close this issue now. |
SUMMARY
Unable to apply configuration via kbst/kustomization using kubeconfig_raw option.
Apply for any Kubernetes object type managed by kustomization results in an error. Provider kustomization has an issue with kubeconfig processing.
error example (CLICK TO SHOW)
This issue is similar to #90, where the explicit definition of context provided a sufficient workaround for the given issue. In our case, this workaround does not work.
Provider kustomization did not work with explicit
kubeconfig_raw
andcontext
definition.terraform-provider-kustomization/kustomize/provider.go
Lines 90 to 95 in 0b49602
DETAILS
Versions
Use case
Kubernetes cluster 1.24.1 hosted in Oracle Cloud Infrastructure (OCI)
Kubeconfig is generated via OCI
kubeconfig content (CLICK TO SHOW), that is assigned to "kubeconfig_raw" parameter
Ideas
Is it possible that this specific kubeconfig type is not supported? E.g. included command execution in kubeconfig (see /users/0/user/exec/command) can be a problem to the kustomization provider?
The text was updated successfully, but these errors were encountered: