k8s monitoring of Weave Scope

With a Weave Scope monitor cluster

Kubernetes create and deploy a cluster container applications only the first step. Once the cluster up and running, we need to ensure normal with all the necessary components in place and perform their duties and have sufficient resources to meet the needs of the application. Kubernetes is a complex system, operation and maintenance team need to have tools to help them learn real-time status of the cluster, and provide timely and accurate data to support troubleshooting.

Kubernetes common monitoring program
Weave Scope

Weave Scope is Docker and Kubernetes visual monitoring tool. Scope provides a complete view of infrastructure and applications for clusters top-down, users can easily containers distributed applications for real-time monitoring and problem diagnosis.

Installation Scope

Scope The method is very simple to install, run the following command:

the Apply -f kubectl " https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl Version | Base64 | TR -d '\ the n-') & K8S-Service-NodePort of the type ="
successful deployment after, the following relevant 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 unchanged
serviceaccount/weave-scope created
clusterrole.rbac.authorization.k8s.io/weave-scope configured
clusterrolebinding.rbac.authorization.k8s.io/weave-scope configured
deployment.apps/weave-scope-app created
service/weave-scope-app created
deployment.apps/weave-scope-cluster-agent created
daemonset.apps/weave-scope-agent created
[root@k8s-master ~]# kubectl get pod -n weave
NAME                                         READY   STATUS              RESTARTS   AGE
weave-scope-agent-bct26                      1/1     Running             0          30s
weave-scope-agent-vzdbr                      0/1     ContainerCreating   0          30s
weave-scope-agent-xvwsp                      0/1     ContainerCreating   0          30s
weave-scope-app-cf544d8c4-v9x5z              1/1     Running             0          30s
weave-scope-cluster-agent-6466d94ccf-r4vql   0/1     ContainerCreating   0          30s
[root@k8s-master ~]# kubectl get pod -n weave
NAME                                         READY   STATUS    RESTARTS   AGE
weave-scope-agent-bct26                      1/1     Running   0          57s
weave-scope-agent-vzdbr                      1/1     Running   0          57s
weave-scope-agent-xvwsp                      1/1     Running   0          57s
weave-scope-app-cf544d8c4-v9x5z              1/1     Running   0          57s
weave-scope-cluster-agent-6466d94ccf-r4vql   1/1     Running   0          57s
[root@k8s-master ~]# kubectl get svc -n weave 
NAME              TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
weave-scope-app   NodePort   10.108.59.226   <none>        80:31013/TCP   68s
[root@k8s-master ~]# kubectl get deployments. -n weave 
NAME                        READY   UP-TO-DATE   AVAILABLE   AGE
weave-scope-app             1/1     1            1           81s
weave-scope-cluster-agent   1/1     1            1           80s

DaemonSet weave-scope-agent, scope agent program on each cluster node runs, is responsible for collecting data.

Deployment weave-scope-app, scope application, to obtain data from the agent, UI display through the Web and interact with the user.

Service weave-scope-app, the default is ClusterIP type, have been added k8s-service-type parameters in the command above = NodePort amended as NodePort.

Use Scope

Browser access http://192.168.56.106:31013/,Scope default displays all current Controller (Deployment, DaemonSet, etc.).

k8s monitoring of Weave Scope

Topology

Scope will automatically build logical topology and application clusters. For example, click on the top PODS, will show dependencies between all Pod and Pod.

k8s monitoring of Weave Scope

Click HOSTS, it will show the relationship between the various nodes.

k8s monitoring of Weave Scope

Real-time resource monitoring

You can view the resource in the Scope of the CPU and memory usage.

k8s monitoring of Weave Scope

Support resources Host, Pod and Container.

k8s monitoring of Weave Scope

k8s monitoring of Weave Scope

Online operation

Scope also provides a convenient online operation functions, such as select a Host, click> _ button to open the node directly in the browser command line in Terminal:

k8s monitoring of Weave Scope

Click Deployment of + Scale Up operation can be performed:

Pod can view the log:
k8s monitoring of Weave Scope

Can attach, restart, stop the vessel, as well as troubleshoot an issue directly in the Scope:
k8s monitoring of Weave Scope

Powerful search

Scope supports keyword search and locate resources.
k8s monitoring of Weave Scope

It can also search conditions, such as search and locate MEMORY> 100M of Pod.
k8s monitoring of Weave Scope

Weave Scope interface is extremely friendly and simple and smooth operation.

Guess you like

Origin blog.51cto.com/5157495/2443459