### Clone repo and start Vagrant cluster Source: https://github.com/alibaba/kubeskoop/blob/main/deploy/vagrant-exporter/README.md Run these commands to clone the kubeskoop repo, move to the vagrant-exporter folder, and start the 3-node Kubernetes cluster with Vagrant. Requires Vagrant and VirtualBox installed. ```shell git clone git@github.com:alibaba/kubeskoop.git cd kubeskoop/deploy/vagrant-exporter vagrant up ``` -------------------------------- ### Install KubeSkoop exporter locally from cloned repository Source: https://github.com/alibaba/kubeskoop/blob/main/deploy/helm/README.md Clones the KubeSkoop repository and installs the Helm chart from a local tarball with debug output. Useful for debugging the Helm chart. ```shell # Clone KubeSkoop to local disk. git clone https://github.com/alibaba/kubeskoop.git # Install the helm chart locally. helm install -n kubeskoop --create-namespace kubeskoop-exporter ./kubeskoop/deploy/kubeskoop-exporter-0.3.0.tgz --debug ``` -------------------------------- ### Deploy KubeSkoop bundle with kubectl apply Source: https://github.com/alibaba/kubeskoop/blob/main/README.md Deploys KubeSkoop, Prometheus, Grafana, and Loki to the cluster using the provided skoopbundle.yaml. The bundle starts with minimum replicas and default configurations, not suitable for production. ```bash kubectl apply -f https://raw.githubusercontent.com/alibaba/kubeskoop/main/deploy/skoopbundle.yaml ``` -------------------------------- ### Install KubeSkoop exporter via Helm repository Source: https://github.com/alibaba/kubeskoop/blob/main/deploy/helm/README.md Adds the KubeSkoop charts repository, updates Helm repo info, and installs the KubeSkoop exporter in the 'kubeskoop' namespace. Requires Helm and network access to the repository. ```shell # Add KubeSkoop charts repo helm repo add kubeskoop https://kubeskoop.github.io # You need to update helm repo info for the first time. helm repo update # Install KubeSkoop exporter. helm install -n kubeskoop --create-namespace kubeskoop-exporter kubeskoop/kubeskoop-exporter ``` -------------------------------- ### Get webconsole service details Source: https://github.com/alibaba/kubeskoop/blob/main/README.md Retrieves the webconsole service information to access the KubeSkoop Web Console. May require a NodePort or LoadBalancer for external access. Default credentials are admin/kubeskoop. ```bash kubectl get svc -n kubeskoop webconsole ``` -------------------------------- ### Check KubeSkoop pods in kubeskoop namespace Source: https://github.com/alibaba/kubeskoop/blob/main/deploy/vagrant-exporter/README.md Run this command on the master node to list pods in the kubeskoop namespace where KubeSkoop is installed. ```shell # on master node kubectl get pod -n kubeskoop ``` -------------------------------- ### Check KubeSkoop exporter status via kubectl and curl Source: https://github.com/alibaba/kubeskoop/blob/main/deploy/helm/README.md Verifies the DaemonSet pods are running, then queries probe status through the Kubernetes API server proxy or directly via pod IP. Replace the placeholders with actual namespace, pod name, and IP. ```shell # Get pod running status of KubeSkoop exporter kubectl get pod -n kubeskoop -l app=kubeskoop-exporter -o wide # After pods are runing, you can get running status of probes through API server. kubectl get --raw /api/v1/namespaces/{{kubeskoop-exporter的pod namespace}}/pods/{{kubeskoop-exporter的pod name}}:9102/proxy/status | jq . # You can also curl it if you have direct access to the pod IP. curl {{kubeskoop-exporter的pod ip}}:9102/status |jq . ``` -------------------------------- ### SSH into master and check kube-system pods Source: https://github.com/alibaba/kubeskoop/blob/main/deploy/vagrant-exporter/README.md Use these commands to SSH into the master node and list pods in the kube-system namespace to inspect the cluster. ```shell vagrant ssh master # on master node kubectl get pod -n kube-system ```