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: firstname.lastname@example.org 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