ere is what I did to work it through.... 1. Enabled verbose to make sure config files are read properly.
kubectl get svc --v=10
- Modified the file as below:
apiVersion: v1
clusters:
- cluster:
server: XXXXXXXXXXXXX
certificate-authority-data: XXXXXXXXXX
name: my-eks
contexts:
- context:
cluster: my-eks
user: aws
name: aws
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
command: aws-iam-authenticator
args:
- "token"
- "-i"
- "my-eks"
# - "-r"
# - "<role-arn>"
env:
- name: AWS_PROFILE
value: "aws"