Environment Description:
CPU name | Operating system version | ip | docker version | omelets version | Configuration | Remark |
---|---|---|---|---|---|---|
master | Centos 06/07/1810 | 172.27.9.131 | Docker 18.09.6 | V1.14.2 | 2C2G | master host |
node01 | Centos 06/07/1810 | 172.27.9.135 | Docker 18.09.6 | V1.14.2 | 2C2G | node node |
node02 | Centos 06/07/1810 | 172.27.9.136 | Docker 18.09.6 | V1.14.2 | 2C2G | node node |
A, Weave Scope Introduction
Weave Scope automatically generate a map of the application, so you can intuitively understand, monitor and control the application of the micro-container-based services.
Weave Scope can monitor kubernetes cluster a series of state resources, resource usage, application topology, scale, also may enter the interior of the container and debugging directly through the browser,其提供的功能包括:
- Interactive topology interface
- Graphics mode and table mode
- Filtering
- searching feature
- Real-time metrics
- Troubleshooting container
- Plug-in extension
Weave Scope of App和Probe
two parts:
- Probe responsible for the collection container and a host of information, and sends App
- App responsible for processing this information and generate reports, and present in the form of interface
Two, Weave Scope installation
1. Install Weave Scopea
[root@master ~]# kubectl apply -f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')"
namespace/weave created
serviceaccount/weave-scope created
clusterrole.rbac.authorization.k8s.io/weave-scope created
clusterrolebinding.rbac.authorization.k8s.io/weave-scope created
deployment.apps/weave-scope-app created
service/weave-scope-app created
deployment.apps/weave-scope-cluster-agent created
daemonset.apps/weave-scope-agent created
2. Resource View
[root@master ~]# kubectl get all -n weave
NAME READY STATUS RESTARTS AGE
pod/weave-scope-agent-hx4t2 1/1 Running 0 103s
pod/weave-scope-agent-vmbqr 1/1 Running 0 103s
pod/weave-scope-agent-zd8x7 1/1 Running 0 103s
pod/weave-scope-app-b99fb9585-77rld 1/1 Running 0 104s
pod/weave-scope-cluster-agent-58f5b5454-vnckm 1/1 Running 0 103s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/weave-scope-app ClusterIP 10.99.31.182 <none> 80/TCP 105s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/weave-scope-agent 3 3 3 3 0 <none> 104s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/weave-scope-app 1/1 1 1 105s
deployment.apps/weave-scope-cluster-agent 1/1 1 1 105s
NAME DESIRED CURRENT READY AGE
replicaset.apps/weave-scope-app-b99fb9585 1 1 1 105s
replicaset.apps/weave-scope-cluster-agent-58f5b5454 1 1 1 105s
3. External Access
Modify service / weave-scope-app, modify its mode of NodePort ClusterIP, it can be directly NodeIP: Port Access mode
[root@master ~]# kubectl edit service -n weave weave-scope-app
service/weave-scope-app edited
4. Log
Login url: http://172.27.9.131:30022/
Third, the use Weave Scope
1. Resource viewed in two ways
Pod, for example to see the resources, resource show two forms:
Figure in the form of:
It will graphically display topological relationships between pod
Tabular form:
Weave Scope monitor object has the process container, pods, and other host, monitor item has cpu, memory, average load and so on.
2. Resource Usage View details
Click on the details of a pod, will showcase state, resource usage, process, etc.
3.pod Log Viewer
Resource usage details, click 'Get logs'
4.pod description View
5. Resources telescopic
Click on the type of deployment Controllers, and can be scaled deployment of View
6. container operations
Can attach, exec shell, restart, paus and stop operation of the vessel
Into the container, performing operations df -h
7. Select the display condition
Lower-left corner may show conditions, the type of container (system or application), the container status (stopped or running), name space.
8. Search function
Search by vessel name
Search by resources