-
Notifications
You must be signed in to change notification settings - Fork 378
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
cannot create Kubernetes client: Unauthorized #892
Comments
Exeriencing the same issue |
Same issue here with Crossplane v1.5.0, provider-aws v0.20.0 and provider-kubernetes v0.1.0. |
we have the same Issue with v0.20.0 :/ with provider-aws, provider-helm |
Just hit this myself - it's not immediately obvious to me what change is responsible for this regression but my first guess would be #602. https://github.com/crossplane/provider-aws/blob/v0.20.0/pkg/clients/eks/eks.go#L336 The above function is the code that should be handling ensuring the kubeconfig connection detail is up-to-date. |
@negz thanks for the code function
via crossplane (in aws-provider 0.20.0 result is unauthorized) we setup connection secret with kubeconfig removed base64 and also removed base64 after
lets try with aws-cli via aws cli: (is working)
think the problem is around the X-Amz-SignedHeaders with x-k8s-aws-id here https://github.com/crossplane/provider-aws/blob/v0.20.0/pkg/clients/eks/eks.go#L342 |
i handled to get kubeconfig working again in v0.20.0 - provider-helm & helm-chart rollout successful - who can take a review & test also? |
provider-aws v0.20.1 has been released with the fix. Please test and confirm that the problem is fixed once you have a chance 🙂 |
This fixed it. Thanks! |
What happened?
After upgrading to
provider-aws@v0.20.0
(which is based on aws-sdk-go-v2),provider-kubernetes
is no longer able to connect to the EKS cluster usingprovider-kubernetes
ProviderConfig
.With existing EKS clusters (created before upgrading
provider-aws
) the previously working connection to the EKS clusters break.Reason: CannotConnectToProvider.
If a new EKS cluster is launched after upgrading
provider-aws
,provider-kubernetes
is similarly unable to make a connect to the EKS cluster to proceed with the setup.Comparing the related kubeconfig Secret objects referenced by
provider-kubernetes
ProviderConfig, the kubeconfig user token value is slightly shorter whenprovider-aws@v0.20.0
is installed compared to older versions of the provider, likely due to aws-sdk-go-v2.Based on the discussion in Crossplane Slack, the same problem affects
provider-helm
.How can we reproduce it?
composition.txt
What environment did it happen in?
Crossplane version: v1.4.1
Provider AWS: v0.20.0
Provider Kubernetes: v0.1.0
Kubernetes distribution: AWS EKS v1.21
The text was updated successfully, but these errors were encountered: