Kubernetes

Kubernetes, also known as K8s, is an open-source system for automating the deployment, scaling, and management of containerized applications.

  1. Planet Scale: Designed on the same principles that allow Google to run billions of containers a week, Kubernetes can scale without increasing your operations team.

  2. Never Outgrow: Whether testing locally or running a global enterprise, Kubernetes flexibility grows with you to deliver your applications consistently and easily no matter how complex your need is.

  3. Run K8s Anywhere: Kubernetes is open source giving you the freedom to take advantage of on-premises, hybrid, or public cloud infrastructure, letting you effortlessly move workloads to where it matters to you.

Pre-requisite for Kubernetes Resource collection

1. To Collect the Kubernetes environment resource, we need to have the Kubernetes environment setup in the public cloud or private cloud, or any other environment.

  1. If Hybr collects the Kubernetes Resource, we have to provide the kubeconfig file to connect to the cluster

To connect to a remote Kubernetes cluster using a Kube config file, you first need to obtain the configuration file from the cluster administrator or from the cloud provider where the cluster is hosted. Here's how you can obtain the Kube config file:

  1. If the cluster is hosted on a cloud provider, check their documentation for instructions on how to obtain the Kube config file. For example,

  • if the cluster is on Google Cloud Platform (GCP), you can use the gcloud command-line tool to retrieve the Kube config file:

GCP Kubenetes Cluster
gcloud container clusters get-credentials <CLUSTER_NAME> --zone <ZONE> --project <PROJECT_ID>

  • if the cluster is on Azure, you can use the azure cli tool to retrieve the Kube config file:

AKS Cluster
az aks get-credentials --resource-group <RESOURCE_GROUP> --name <CLUSTER_NAME>
  • if the cluster is on AWS, you can use the aws cli tool to retrieve the Kube config file:

EKS Cluster
aws eks update-kubeconfig --name <CLUSTER_NAME> --region <REGION>
  1. If the cluster is self-hosted, ask the cluster administrator to provide you with the Kube config file. They can generate the file using the kubectl config command and send it to you:

kubectl config view --flatten > <OUTPUT_FILE>

Replace <PATH_TO_CONFIG_FILE> with the path to the configuration file on the remote cluster, and <OUTPUT_FILE> with the path where you want to save the configuration file on your local machine.

  1. If you already have access to the cluster via SSH, you can copy the Kube config file from the remote cluster to your local machine using the scp command:

scp <REMOTE_USER>@<REMOTE_HOST>:<PATH_TO_CONFIG_FILE> <LOCAL_PATH>

Replace <REMOTE_USER>, <REMOTE_HOST>, <PATH_TO_CONFIG_FILE>, and <LOCAL_PATH> with the appropriate values for your cluster.

Onboarding Kubernetes resource in HYBR:

  1. Log into the Hybr Admin portal and navigate to Reporting → Data Sources -> Connections page.

  1. Click on the Create Connection button and Choose Kubernetes in the 'Category' Select box and provide the connection name and choose 'Kubernetes API Endpoint' as Endpoint

  1. Choose the Kube.config file which you have fetched from the server and provide the cluster name

It will start collecting the Kubernetes Resources data in the background. You can see the resources in the Reporting → Resources -> Kubernetes Resources

Last updated