Cloud Computing, DevOps

4 Mins Read

Top Kubernetes Tools to Simplify Cluster Management and Real-Time Monitoring

Voiced by Amazon Polly

Introduction

Managing Kubernetes clusters can often feel overwhelming, especially when dealing with multiple pods, containers, and deployments. However, with the right tools, you can simplify the entire process and make cluster management much more efficient. In this blog, we’ll explore some of the top Kubernetes tools, like K9s for cluster management and Stern for real-time log monitoring, that will help you interact with your Kubernetes setup effortlessly from your local machine. Whether you’re a developer or an operator, these tools are essential for streamlining navigation, troubleshooting, and monitoring, making Kubernetes management feel like a breeze.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Cluster Management

K9s

K9s is a terminal-based UI designed to simplify interaction with Kubernetes clusters. This tool streamlines the real-time navigation, observation, and management of deployed applications. Continuously monitoring Kubernetes for changes, K9s provides intuitive commands to help you efficiently manage and interact with your cluster resources. Perfect for developers and operators, K9s enhance productivity by offering a smooth and accessible way to handle complex Kubernetes environments.

Installation:

  • Via Webi for Linux and macOS

Few useful commands:

  1. Launching k9s

Simply type k9s in your terminal and hit Enter.

tool

2. Example Commands with k9s.

  • Example 1: Press enter on the pod name to retrieve Pod details

tool2

  • Example 2: Press enter on the container name to view the logs of Pod

tool3

  • Example 3: To view Daemonset, press: and type daemonsets

tool4

  • To quit the Terminal, press: and type q

Log monitoring

Stern

Stern is an open-source tool for real-time log aggregation from multiple Kubernetes pods and containers. It provides a powerful way to tail and search logs across all or selected pods in a Kubernetes cluster, making it much easier to troubleshoot, monitor, and debug applications. Stern allows you to filter logs based on namespace, pod, container, and even specific labels, giving you flexibility when dealing with multiple workloads.

Installation:

  • Linux and macOS

brew install stern

Few useful commands:
Get all logs in a given namespace
Example: stern  . -n <namespace>

tool5

Filter logs for a specific deployment
Example: stern -l app=<deployment-name>  –include “<search-string>”

tool6

Security

kubesec

KubeSec is a tool designed to assess the security of Kubernetes manifests. It helps detect potential security risks by analyzing YAML files that define Kubernetes resources such as Pods, Deployments, or Services. The primary goal of KubeSec is to ensure that the Kubernetes clusters and applications running on them follow best security practices.

Installation:

  • tar -xvf kubesec_linux_amd64.tar.gz
  • mv kubesec /usr/local/bin/

Few useful commands:

Kubesec scan <manifest.yaml>

tool7

kubent

Kubent (Kubernetes Event Notifier) is a tool designed to detect deprecated Kubernetes APIs in your cluster, ensuring that your applications and resources are compatible with the version of Kubernetes you are running. As Kubernetes evolves, certain APIs and features get deprecated or removed, so keeping track of deprecated resources before upgrading is important to avoid breaking changes.

Installation:

  • On Linux – sh -c “$(curl -sSL https://git.io/install-kubent)”

Few useful commands:

  • Simply type kubent to see the results in case of having the kubeconfig in different location use the below command
    kubent -k < kubeconfig file path>

tool8

Local Kubernetes tool

K3s

K3s is a lightweight, fully certified Kubernetes distribution designed for resource-constrained environments. Developed by Rancher Labs, K3s is designed to provide a simple, easy-to-install, low-resource solution for running Kubernetes clusters in edge computing, IoT devices, and development setups. K3s is optimized for minimal CPU, memory, and storage footprints, making it ideal for small-scale clusters, embedded devices, and development purposes.

Installation:

  • On Linux – curl -sfL https://get.k3s.io | sh –

Few useful commands:

  • sudo k3s kubectl get node
  • sudo k3s kubectl create deploy nginx –image=nginx
  • sudo k3s kubectl get pods

tool9

tool10

Conclusion

Managing Kubernetes clusters doesn’t have to be overwhelming. Tools like K9s, Stern, Kubesec, Kubent, and K3s simplify cluster management, real-time log monitoring, security assessment, and deprecated API detection.

These tools empower you to manage your Kubernetes environment efficiently from your local setup, making the entire process smoother and more effective. With these in your toolkit, you can handle Kubernetes like a pro!

By incorporating these powerful tools into your workflow, you can make Kubernetes management hassle-free and more efficient.

Drop a query if you have any questions regarding Kubernetes and we will get back to you quickly.

Empowering organizations to become ‘data driven’ enterprises with our Cloud experts.

  • Reduced infrastructure costs
  • Timely data-driven decisions
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery Partner and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

FAQs

1. Can K9s be used with multiple Kubernetes clusters?

ANS: – Yes, K9s can be configured to switch between multiple Kubernetes clusters. You can use K9s with different kubeconfig contexts to manage multiple clusters from a single interface. Simply switch contexts within K9s or use kubectl config use-context before launching K9s.

2. Does Stern support log coloring to differentiate between pods or containers?

ANS: – Yes, Stern supports color-coded output, making it easier to differentiate between logs from different pods or containers. Each pod/container gets its color in the terminal, making the logs more visually distinct and easier to track.

WRITTEN BY Aishwarya M

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!