-
Notifications
You must be signed in to change notification settings - Fork 986
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
Getting x509-certificate-signed-by-unknown-authority #1154
Comments
This could happen if the value of
I have a similar configuration, but I was fetching the certificate from the EKS module like this: I think your configuration is a better approach though. I'll update the example config using your approach and let you know the results. |
@dak1n1 I will try your suggestion mate and let you know if it has worked. Cheers! |
@dak1n1 - Is instance size the reason behind this error? Because this error is not cropping up when I change the instance to a bigger one...like m4.large instead of a smaller one like t2.small. I am just assuming, and it is a wild guess. now my code block is
|
That is interesting... In my testing, I've been able to update the instance size of an EKS cluster without having the cluster get re-created, so updating the instance size shouldn't cause BTW, I did incorporate the data source you used into our EKS example, since it's a more reliable way to refer to the certificates than using the module outputs. So that part works well. I tried out instance size Oh! You know what I just noticed... this configuration is actually using mutually-exclusive authentication options. 🤦 Sorry I didn't see that before! When multiple ways of authenticating are specified, such as when using
I have a fix for that provider bug that will make it easier to configure this. In the mean time, can you try a configuration that does not specify For example: This is how I check for environment variables on my system:
I usually unset any that might interfere (here's a list of them): Assuming there are no KUBE environment variables interfering, the following provider config should work. This is the one I had been using in my tests since I saw this issue:
Once the fix is released, the provider will be more straightforward in telling you exactly what options are incompatible with what other options, rather than silently combining some of the given options and ignoring some other options, as it does today. |
@dak1n1 Those are some interesting observations! I will try out the config without config_path and let you know the results. Have a great weekend! |
@dak1n1 I've applied the following k8s logic upon your suggestion.
Removed I somehow feel the issue highlighted in summary arose due to a combination of wrong instance size and mixed authentication scenario. Why I am saying this because I was able to connect to k8s cluster using kubectl after modifying instance size. No error cropped up (as told in previous message). Also, I didn't remove Looking forward for the new version! |
I'm glad to hear it worked! I'll go ahead and close this for now. If you find the issue comes up again, we can re-open it. |
Sure 👍 Another advantage of avoiding Have a great day! |
@ackris I haven't encountered that error myself, but my team would be happy to take a look in a new github issue, especially if you have a config that reproduces the issue. I wouldn't want to leave the bug there and document it as expected behavior, since we can probably fix it instead. Offhand, I think it could be solved in the configuration by ensuring that Terraform knows about the dependency between the file and the Kubernetes provider. Referencing the file by its resource name, rather than an output or hard-coded file name, would establish an implicit dependency between the two. We could document the configuration for that, if it ends up being better solved in configs than in the provider code. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Hi Everyone,
I have been able to successfully access an eks cluster created via
eks terraform module
with a caveat. I am unable to access the cluster securely.Version Information
As far as I can understand, kubernetes provider is not accepting the cert generated during eks instantiation as safe/valid.
Until I pass
insecure = true
, I am unable to access the cluster. Please find below my scripts.k8s-provider.tf:
eks-cluster.tf:
As you can see, I had to comment out
cluster_ca_certificate
attribute and mention insecure as true.Steps to reproduce
cluster_ca_cert.
terraform apply
.x509 certificate error
.Expected Behavior
Access the cluster securely without x509 certifcation error.
Actual Behavior
Accessing the cluster insecurely with insecure set to true.
References
https://discuss.hashicorp.com/t/x509-certificate-signed-by-unknown-authority/8671
The text was updated successfully, but these errors were encountered: