问题
I create k8s cluster in aws by using kops
i wrote kubernetes cluster name : test.fuzes.io
api url : https://api.test.fuzes.io/api/v1
and i fill the CA Certificate field with result of
kubectl get secret {secrete_name} -o jsonpath="{['data']['ca\.crt']}" | base64 --decode
and finally i fill the Service Token field with result of
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab-admin | awk '{print $1}')
but when i save changes, i got message
There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid.
and i can't install helm tiller with kubernetes error:404
I really don't know what i did wrong. please help me....
回答1:
As @fuzes confirmed cluster re-creation can be a workaround for this issue.
This was also described on a GitLab Issues - Kubernetes authentication not consistent
In short: Using the same Kubernetes cluster integration configuration in multiple projects authenticates correctly on one but not the other.
Another suggestion to work around this by just setting CI Variables (KUBE_NAMESPACE
and KUBECONFIG
) instead of using our Kubernetes integration.
Hope this will be helpful for future references.
回答2:
kubectl cluster-info | \
grep 'Kubernetes master' | \
awk '/http/ {print $NF}'
return https://control.pomazan.xyz/k8s/clusters/c-t7qr5
But use like https://80.211.195.192:6443
as API URL.
来源:https://stackoverflow.com/questions/56732383/there-was-a-problem-authenticationg-with-your-cluster-when-i-making-gitlab-and