Lens is a really cool front end dashboard for Kubernetes clusters. One issue I ran into from connecting to the cluster was that I typically use different AWS Profiles for different clusters.
Typically I’ll do something like:
To set my user. To put this in Lens so that it can connect, we just add this to the environment variable in the
users: - name: email@example.com user: exec: apiVersion: client.authentication.k8s.io/v1alpha1 args: - token - -i - dec14 command: aws-iam-authenticator env: - name: AWS_STS_REGIONAL_ENDPOINTS value: regional - name: AWS_DEFAULT_REGION value: us-west-2 - name: AWS_PROFILE value: eksdude
Then we can simply add this to Lens
I’ve also found that I can make Lens work with EKS clusters that sit on a private network. I just use
sshuttle -r <bastion host> 0/0 and it connects perfectly!