Troubleshooting in Kubernetes
Sometimes, you may need advanced tools for viewing the cluster resources and configurations. Here's a short guide on our recommended approach.
Recommended Tools
We use the following tools and recommend them to our users, as well:
- Lens - https://k8slens.dev/
- K9s - https://k9scli.io/
It all comes down to whether you're a terminal person or an IDE person.
At the same time, kubectl
may prove itself extremely useful.
Pre-requisites
You're going to need to have the cluster credentials set up in your kubectl
config first, regardless of which tool you use.
They require the same data which Bunnyshell requires when connecting a Kubernetes cluster, making it easier for you to retrieve this info.
If this is not the case, please consult this section.
Brief Demonstration
As we already pointed out a few times, each Environment is deployed in its own Kubernetes Namespace.
You first need to get that namespace, then connect with your weapon of choice to the cluster. Access your environment and you will see the Environment's default namespace displayed next to K8s namespace, as indicated in the image below.
Bunnyshell creates a default namespace for each Environment. No worries, you will be able to deploy workloads in other namespaces as well. In some cases, you might not even use the default namespace at all.
You'll be able to see created resources, as well as retrieve logs from Pods, run commands within containers, and visualise consumed resources.
The screenshots below were taken in Lens, since this is used as a visual resource.
Updated 10 months ago