Site icon

K8s Lens IDE on AWS/ACI EKS infrastructure

Table of contents

  1. Introduction
  2. What we will show in this article
  3. Get Started with Lens
    1. Install Lens
    2. Onboard your K8s Cluster
      1. Pre-Requisite Setup
      2. Add in your K8s Cluster(s)
    3. Using Lens
  4. References

Introduction

Recently, I was looking into Lens IDE for K8s and found it to be very impressive. What I liked about it most is that it is really simple and can be installed on your desktop (macOS, Windows or Linux) in minutes. After the intial install all you have to do is to onboard your K8s cluster ( on Physical Infrastructure, AKS, EKS, GKE or anywhere else), put in a couple of quick basic configuration parameters and you have a fully working, easy to use IDE for your K8s cluster. You can onboard multiple clusters and switching between them is a one click operation on the UI. You can then view metrics, of your K8s related clusters and deployments, create/delete/edit/visualize all your K8s objects like namespaces, deployments, services etc. You can even shell into any of your pod containers all from the UI. You can read more about Lens at: https://docs.k8slens.dev/main/. If you are not very well versed with K8s, then this will be of great help. If you are well versed with K8s, you will appreciate this even more for it’s simplicity of operations.

What we will show in this article

In this article, I will show how to onboard and use Lens on the ACI/AWS EKS cluster that we deployed based on the writeup at: https://unofficialaciguide.com/2021/12/20/terraform-with-cisco-nexus-dashboard-orchestrator-for-building-hybrid-cloud-and-end-to-end-services/

Please keep in mind that Lens has no bearing on ACI per se. You can install Lens and manage any K8s based cluster. I was in two minds about writing this article because unofficialaciguide.com is really meant to cover ACI and related technologies only. However, I though for folks that are not familiar with Lens, this would really help them out and would be appreciated.

Get Started with Lens

First thing to do is to install Lens. You can install Lens on any desktop, Mac, Linux, Windows.

Install Lens

To install Lens, go to https://k8slens.dev
Download and install the appropriate code based on your OS. A snapshot of the available images are shown below:

Figure1: Lens Images available

Onboard your K8s Cluster

Pre-Requisite Setup

Since in this article, we show how to onboard the EKS (AWS K8s), cluster, we need to ensure that we also have AWS CLI installed on the desktop and create the default AWS profile. If you are going to install on physical K8s cluster, you don’t need AWS CLI and AWS profile. For Azure AKS and GCP GKE you will need to perform similar actions. In this example, I am demonstrating on a MAC desktop.

  1. Install AWS CLI, please follow: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
  2. Create AWS default Profile: aws configure --profile tfuser ( # tfuser is the username you created in AWS for this.)
  3. export the profile export AWS_DEFAULT_PROFILE=tfuser and then check that it is working with aws sts get-caller-identity
  4. Install kubectl if not already installed on your desktop. Please follow https://kubernetes.io/docs/tasks/tools/
  5. copy the kubeconfig file to the home directory fo file: ~/.kube/config (in my demo case in the prviious article, I had shown install of EKS cluster from ubuntu jumpbox. I just copied the contents of the ~/.kube/config from ubuntu jumpbox to my mac desktop. If you installed the EKS cluster from your MAC desktop, then the kube config file will already be there)
  6. Modify the kubeconfig file to include the environment for the AWS Profile you created. In the example below, since the AWS default profile was created with name tfuser, I modified my kubeconfig file to include that


Figure 2: adding in the env for AWS profile in kube-config

Add in your K8s Cluster(s)


Figure 7: Going to Settings/Lens Metrics

Using Lens

Using Lens is really simple and intutive. You just choose your cluster and then click on the menus and do whatever you want to do. Since it’s so intutive, there is no need for me to show you around. I will just point out some basic stuff here.

References

https://docs.k8slens.dev/main/
https://k8slens.dev
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
https://kubernetes.io/docs/tasks/tool

Go To TOP

Exit mobile version