Followed this document https://docs.aws.amazon.com/eks/latest/userguide/cert-signing.html to get the certificate issued.
I created cluster role and role binding to test it.
1469@1469-1469:~/access$ kubectl auth can-i create pods --as=myserver
yes
1469@1469-1469:~/access$ kubectl auth can-i list pods --as=myserver
no
1469@1469-1469:~/access$ kubectl auth can-i delete secrets --as=myserver
no
and
1469@1469-1469:~/access$ kubectl auth can-i create pods --user=myserver
error: You must be logged in to the server (Unauthorized)
But when trying to setup config I’m having a peoblem. How to get “certificate-authority”, its EKS cluster.
Is there any command to setup the kubectl config to utilse the .key and .crt file inordee to access the cluster.