中文字幕日韩精品一区二区免费_精品一区二区三区国产精品无卡在_国精品无码专区一区二区三区_国产αv三级中文在线

Kubernetes1.8.4中如何安裝Heapster

這篇文章給大家分享的是有關(guān)Kubernetes 1.8.4中如何安裝Heapster的內(nèi)容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

站在用戶的角度思考問題,與客戶深入溝通,找到河曲網(wǎng)站設(shè)計與河曲網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗,讓設(shè)計與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個性化、用戶體驗好的作品,建站類型包括:成都網(wǎng)站設(shè)計、網(wǎng)站制作、外貿(mào)營銷網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣、空間域名、網(wǎng)絡(luò)空間、企業(yè)郵箱。業(yè)務(wù)覆蓋河曲地區(qū)。

Heapster

      Heapster 是 Kubernetes 社區(qū)維護的容器集群監(jiān)控分析工具。Heapster 會從 Kubernetes apiserver 獲得所有 Node 信息,然后再通過這些 Node 來獲得 kubelet 上的數(shù)據(jù),最后再將所有收集到數(shù)據(jù)送到 Heapster 的后臺儲存 InfluxDB,最后利用 Grafana 來抓取 InfluxDB 的數(shù)據(jù)源來進行可視化。

  • 在master通過 kubectl 來創(chuàng)建 kubernetes monitor 即可
    生成kube-heapster.yml

    cat <<EOF > kube-heapster.yml
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: heapster-sa
      namespace: kube-system
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: heapster-binding
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: system:heapster
    subjects:
    - kind: ServiceAccount
      name: heapster
      namespace: kube-system
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: Role
    metadata:
      name: system:pod-nanny
      namespace: kube-system
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    rules:
    - apiGroups:
      - ""
      resources:
      - pods
      verbs:
      - get
    - apiGroups:
      - "extensions"
      resources:
      - deployments
      verbs:
      - get
      - update
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: RoleBinding
    metadata:
      name: heapster-binding
      namespace: kube-system
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: Role
      name: system:pod-nanny
    subjects:
    - kind: ServiceAccount
      name: heapster
      namespace: kube-system
    ---
    kind: Service
    apiVersion: v1
    metadata:
      name: heapster
      namespace: kube-system
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    spec:
      ports:
        - port: 80
          targetPort: 8082
      selector:
        k8s-app: heapster
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: monitoring-grafana
      namespace: kube-system
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    spec:
      ports:
        - port: 80
          protocol: TCP
          targetPort: ui
      selector:
        k8s-app: influxGrafana
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: monitoring-influxdb
      namespace: kube-system
      labels:
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    spec:
      ports:
        - name: http
          port: 8083
          targetPort: 8083
        - name: api
          port: 8086
          targetPort: 8086
      selector:
        k8s-app: influxGrafana
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: heapster
      labels:
        k8s-app: heapster
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
      namespace: kube-system
    spec:
      replicas: 1
      selector:
        matchLabels:
          k8s-app: heapster
      template:
        metadata:
          labels:
            k8s-app: heapster
          annotations:
            scheduler.alpha.kubernetes.io/critical-pod: ''
        spec:
          serviceAccountName: heapster-sa
          tolerations:
          - key: node-role.kubernetes.io/master
            effect: NoSchedule
          - key: "CriticalAddonsOnly"
            operator: "Exists"
          containers:
            - image: registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-amd64:v1.5.0-beta.0
              name: heapster
              livenessProbe:
                httpGet:
                  path: /healthz
                  port: 8082
                  scheme: HTTP
                initialDelaySeconds: 180
                timeoutSeconds: 5
              command:
                - /heapster
                - --source=kubernetes.summary_api:''
                - --sink=influxdb:http://monitoring-influxdb:8086
            - image: registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-amd64:v1.5.0-beta.0
              name: eventer
              command:
                - /eventer
                - --source=kubernetes:''
                - --sink=influxdb:http://monitoring-influxdb:8086
            - image: registry.cn-hangzhou.aliyuncs.com/google_containers/addon-resizer:1.7
              name: heapster-nanny
              resources:
                limits:
                  cpu: 100m
                  memory: 128Mi
                requests:
                  cpu: 50m
                  memory: 90Mi
              env:
                - name: MY_POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: MY_POD_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.namespace
              command:
                - /pod_nanny
                - --cpu=80m
                - --extra-cpu=0.5m
                - --memory=140Mi
                - --extra-memory=4Mi
                - --threshold=5
                - --deployment=heapster
                - --container=heapster
                - --poll-period=300000
                - --estimator=exponential
            - image: registry.cn-hangzhou.aliyuncs.com/google_containers/addon-resizer:1.7
              name: eventer-nanny
              resources:
                limits:
                  cpu: 100m
                  memory: 128Mi
                requests:
                  cpu: 50m
                  memory: 90Mi
              env:
                - name: MY_POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: MY_POD_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.namespace
              command:
                - /pod_nanny
                - --cpu=100m
                - --extra-cpu=0m
                - --memory=190Mi
                - --extra-memory=500Ki
                - --threshold=5
                - --deployment=heapster
                - --container=eventer
                - --poll-period=300000
                - --estimator=exponential
    ---
    kind: Deployment
    apiVersion: extensions/v1beta1
    metadata:
      name: influxdb-grafana
      namespace: kube-system
      labels:
        k8s-app: influxGrafana
        kubernetes.io/cluster-service: "true"
        addonmanager.kubernetes.io/mode: Reconcile
    spec:
      replicas: 1
      selector:
        matchLabels:
          k8s-app: influxGrafana
      template:
        metadata:
          labels:
            k8s-app: influxGrafana
          annotations:
            scheduler.alpha.kubernetes.io/critical-pod: ''
        spec:
          tolerations:
          - key: node-role.kubernetes.io/master
            effect: NoSchedule
          - key: "CriticalAddonsOnly"
            operator: "Exists"
          containers:
            - name: influxdb
              image: registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-influxdb-amd64:v1.3.3
              resources:
                limits:
                  cpu: 100m
                  memory: 500Mi
                requests:
                  cpu: 100m
                  memory: 500Mi
              ports:
                - name: http
                  containerPort: 8083
                - name: api
                  containerPort: 8086
              volumeMounts:
              - name: influxdb-persistent-storage
                mountPath: /data
            - name: grafana
              image: registry.cn-shenzhen.aliyuncs.com/rancher_cn/heapster-grafana-amd64:v4.4.3
              env:
              resources:
                limits:
                  cpu: 100m
                  memory: 100Mi
                requests:
                  cpu: 100m
                  memory: 100Mi
              env:
                - name: INFLUXDB_SERVICE_URL
                  value: http://monitoring-influxdb:8086
                - name: GF_AUTH_BASIC_ENABLED
                  value: "false"
                - name: GF_AUTH_ANONYMOUS_ENABLED
                  value: "true"
                - name: GF_AUTH_ANONYMOUS_ORG_ROLE
                  value: Admin
                - name: GF_SERVER_ROOT_URL
                  value: /api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
              ports:
              - name: ui
                containerPort: 3000
                protocol: TCP
              volumeMounts:
              - name: grafana-persistent-storage
                mountPath: /var
          volumes:
          - name: influxdb-persistent-storage
            emptyDir: {}
          - name: grafana-persistent-storage
            emptyDir: {}
    EOF

    kubectl apply -f kube-heapster.yml

    查看狀態(tài)

    kubectl -n kube-system get po,svc

    完成后,就可以通過瀏覽器訪問Grafana Dashboard

    https://10.0.0.162:6443/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana

感謝各位的閱讀!關(guān)于“Kubernetes 1.8.4中如何安裝Heapster”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

新聞標(biāo)題:Kubernetes1.8.4中如何安裝Heapster
當(dāng)前路徑:http://www.rwnh.cn/article8/jepgip.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計公司、網(wǎng)站維護、電子商務(wù)網(wǎng)站營銷、網(wǎng)頁設(shè)計公司、手機網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)
调兵山市| 全椒县| 泌阳县| 西青区| 海门市| 兴化市| 平山县| 宜兰县| 井冈山市| 新邵县| 八宿县| 钟祥市| 敦煌市| 高要市| 庆阳市| 城口县| 甘泉县| 鸡东县| 珲春市| 武宣县| 同江市| 北碚区| 钟祥市| 双牌县| 科技| 中宁县| 汶上县| 板桥市| 射阳县| 镇坪县| 宜黄县| 南华县| 日土县| 武威市| 会泽县| 梨树县| 盐亭县| 密山市| 长宁区| 辰溪县| 柳州市|