下载安装包:

https://github.com/weaveworks/scope/releases

解压缩之后,进入example/k8s目录,执行:

kubectl create -f deploy.yaml

并修改svc.yaml如下:

apiVersion: v1
kind: Service
metadata:
  name: weave-scope-app
  labels:
    name: weave-scope-app
    app: weave-scope
    weave-cloud-component: scope
    weave-scope-component: app
  namespace: weave
spec:
  ports:
    - name: app
      port: 80
      protocol: TCP
      targetPort: 4040
      nodePort: 30088
  selector:
    name: weave-scope-app
    app: weave-scope
    weave-cloud-component: scope
    weave-scope-component: app
    type: NodePort

执行:

kubectl apply -f svc.yaml

既可以通过结点30088端口进行访问

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐