In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Monitoring Cluster with Weave Scope
Creating a Kubernetes cluster and deploying containerized applications is only the first step. Once the cluster is up and running, we need to make sure that we are working together, that all the necessary components are in place and that we have sufficient resources to meet the needs of the application. Kubernetes is a complex system, and the operation and maintenance team needs a set of tools to help them know the real-time status of the cluster and provide timely and accurate data support for troubleshooting.
Weave Scope, a commonly used monitoring scheme for Kubernetes
Weave Scope is a visual monitoring tool for Docker and Kubernetes. Scope provides a complete view of top-down cluster infrastructure and applications, and users can easily monitor and diagnose problems with distributed containerized applications in real time.
Install Scope
The way to install Scope is simple, execute the following command:
Kubectl apply-f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr-d'\ n') & k8s-service-type=NodePort"
After a successful deployment, there are the following related components:
[root@k8s-master ~] # kubectl apply-f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr-d'\ n') & k8s-service-type=NodePort" namespace/weave unchangedserviceaccount/weave-scope createdclusterrole.rbac.authorization.k8s.io/weave-scope configuredclusterrolebinding.rbac.authorization.k8s.io/weave-scope configureddeployment.apps/weave-scope-app createdservice/weave-scope-app createddeployment.apps/weave-scope-cluster-agent createddaemonset.apps/weave -scope-agent created [root@k8s-master ~] # kubectl get pod-n weaveNAME READY STATUS RESTARTS AGEweave-scope-agent-bct26 1 Running 0 30sweave-scope-agent-vzdbr 0 30sweave-scope-agent-vzdbr 1 ContainerCreating 0 30 sweaveSumpere- Xvwsp 0 ContainerCreating 1 ContainerCreating 0 30sweave-scope-app-cf544d8c4-v9x5z 1 xvwsp 0 30sweave-scope-cluster-agent-6466d94ccf-r4vql 0 30sweave-scope-cluster-agent-6466d94ccf-r4vql 1 ContainerCreating 0 30s [root@k8s-master ~] # kubectl get pod-n weaveNAME READY STATUS RESTARTS AGEweave-scope-agent-bct26 1/1 Running 0 57sweave-scope-agent-vzdbr 1/1 Running 0 57sweave-scope-agent-xvwsp 1/1 Running 0 57sweave-scope-app-cf544d8c4-v9x5z 1/1 Running 0 57sweave-scope-cluster -agent-6466d94ccf-r4vql 1 Running 0 57s [root@k8s-master] # kubectl get svc-n weave NAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEweave-scope-app NodePort 10.108.59.226 80:31013/TCP 68s [root@k8s-master] # kubectl get deployments. -n weave NAME READY UP-TO-DATE AVAILABLE AGEweave-scope-app 1 to 1 1 1 81sweave-scope-cluster-agent 1 to 1 1 1 80s
DaemonSet weave-scope-agent, the scope agent program that runs on each node of the cluster, is responsible for collecting data.
The Deployment weave-scope-app,scope application, which takes data from agent, displays it through Web UI and interacts with users.
Service weave-scope-app, which defaults to type ClusterIP, has been modified to NodePort by adding the parameter k8s-service-type=NodePort to the above command.
Use Scope
Browsers access http://192.168.56.106:31013/ http://192.168.56.106:31013/ scope to display all current Controller (Deployment, DaemonSet, etc.) by default.
Topological structure
Scope automatically builds the logical topology of applications and clusters. For example, clicking on the top PODS shows the dependencies between all Pod and Pod.
Click HOSTS and the relationship between the nodes will be displayed.
Real-time resource monitoring
You can view the CPU and memory usage of resources in Scope.
Supported resources are Host, Pod, and Container.
Online operation
Scope also provides convenient online operation features, such as selecting a Host and clicking the > _ button to open the command line terminal of the node directly in the browser:
Click the + of Deployment to perform Scale Up operation:
You can view Pod's log:
You can attach, restart, stop containers, and troubleshoot problems directly in Scope:
Powerful search function
Scope supports keyword search and location of resources.
You can also do conditional searches, such as finding and locating Pod with MEMORY > 100m.
The Weave Scope interface is extremely friendly and the operation is simple and smooth.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 205
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.