Eliminating Kubernetes Complexity for Developers Using Lens
Containers and Kubernetes changed how we build, deploy, and run our applications and became a de-facto standard for running infrastructure at scale. It all starts with —
- Packaging the app into a Container Image
- Pushing and pulling images to and from the container registry
- Working with YAML files to define Kubernetes resources
- Deploying resources using kubectl
- Testing & Troubleshooting applications
In the early days — it was very complex to deploy a Kubernetes cluster, but today there are 65 certified Kubernetes distributions approved by CNCF. These distributions provide us with the flexibility to build clusters locally(minikube, Lens Desktop Kube, Docker Desktop), on the private clouds(MKE, RKE), or on the public clouds(EKS, AKS, GKE) seamlessly eliminating the complexity of having an environment to build and test our applications.
However, getting started with Kubernetes application development, troubleshooting issues, and how a user interacts with the clusters daily did not change a lot and is extremely complex.
In this blog post, I’ll walk you through the typical steps followed by developers to deploy and manage applications on Kubernetes, and how they can use Lens Platform to do the same quickly and seamlessly.
A developer’s journey starts with creating Pod in a local Kubernetes cluster using “kubectl”.
“Kubectl” is a command-line utility to interact with Kubernetes clusters to deploy applications, inspect and manage cluster resources, view logs, switch between clusters, and many more. The multitude of options makes it extremely powerful and difficult to master or even get started with it.
For example, here are some of the “kubectl” commands used regularly -
$ kubectl create -f deployment.yaml
$ kubectl get pods
$ kubectl describe pod podname
$ kubectl logs -f podname
$ kubectl exec --stdin --tty podname -- /bin/sh
$ kubectl get pods --sort-by='.status.containerStatuses[0].state.waiting.reason' -o custom-columns="POD:metadata.name,STATE:status.containerStatuses[*].state.waiting.reason"
A user will not run these commands once or twice, but many times just to see if the resource is created successfully and to view any additional information. It does not end there — to exec into a pod, view pod logs, namespaces, workload summary, resource usage, or edit a resource, “kubectl” command with respective options is required.
Modern tools like Lens Platform are engineered to solve this challenge and reduce the pain of learning and adopt Kubernetes.
Here are some of the core features of Lens Platform are -
- Multi-Cluster Management
- Built-In Metrics and Visualization
- Workload Overview
- Context-Aware Terminal
- Resource Editor
- Helm-Chart Management
- Quick access to resource description
- Quick access to Pod Logs and the ability to quickly search for patterns
- Quick access to Pod Shell
- Port-Forwarding
- Light-weight inbuilt Kubernetes cluster
- Sharing cluster with your team
Lens Desktop, part of Lens Platform, is a graphical user interface tool installed on your local workstation(mac, windows, or Linux). It supports any certified Kubernetes distribution, on any infrastructure.
All these awesome features not only abstract the Kubernetes complexity but seamlessly integrate with your current toolset. Here is a quick summary of how Lens integrates into your workflow -
- Develop features using your favorite IDE (Eclipse, IntelliJ, VS Code, etc)
- Commit the code and push it into a code repository (Git, SVN)
- CICD pipeline runs tests and deploys the app to the cluster
Next, the developer can use Lens to check:
- If the deployment was successful
- Observe if the app is running correctly
- Test integrations or performance of the larger system
- Troubleshoot any problems with direct access to the cluster
The new and advanced features like Lens Desktop Kubernetes, Image Scanning, Lens Teamwork, Lens Extensions, and In-app support will lower cognitive load significantly and increase cost savings.
It takes less than 5 minutes to get started with Lens Platform. Try today -