{"id":3784,"date":"2020-12-14T15:22:04","date_gmt":"2020-12-14T21:22:04","guid":{"rendered":"http:\/\/benincosa.com\/?p=3784"},"modified":"2021-02-05T18:53:27","modified_gmt":"2021-02-06T00:53:27","slug":"lens-and-eks","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=3784","title":{"rendered":"Lens and EKS"},"content":{"rendered":"\n<p>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.  <\/p>\n\n\n\n<p>Typically I&#8217;ll do something like: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export AWS_PROFILE=eksdude<\/code><\/pre>\n\n\n\n<p>To set my user.  To put this in Lens so that it can connect, we just add this to the environment variable in the <code>.\/kube\/config<\/code> file: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>users:\n- name: eksdude@dec14.us-west-2.eksctl.io\n  user:\n    exec:\n      apiVersion: client.authentication.k8s.io\/v1alpha1\n      args:\n      - token\n      - -i\n      - dec14\n      command: aws-iam-authenticator\n      env:\n      - name: AWS_STS_REGIONAL_ENDPOINTS\n        value: regional\n      - name: AWS_DEFAULT_REGION\n        value: us-west-2\n      - name: AWS_PROFILE\n        value: eksdude<\/code><\/pre>\n\n\n\n<p>Then we can simply add this to Lens<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"2858\" height=\"1782\" src=\"https:\/\/benincosa.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-14-at-1.21.13-PM.png\" alt=\"\" class=\"wp-image-3785\"\/><figcaption>Lens is a great tool!<\/figcaption><\/figure>\n\n\n\n<p>I&#8217;ve also found that I can make Lens work with EKS clusters that sit on a private network.  I just use <code>sshuttle -r &lt;bastion host> 0\/0<\/code> and it connects perfectly!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;ll do something like: To set my user. To put this in Lens so that it can connect, we just add this&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[957,797],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/3784"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3784"}],"version-history":[{"count":2,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/3784\/revisions"}],"predecessor-version":[{"id":3805,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/3784\/revisions\/3805"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}