zoukankan      html  css  js  c++  java
  • k8s dashboard

    [root@mhc dashboard]# cat dashboard-controller.yaml
    # This file should be kept in sync with cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: kubernetes-dashboard
      namespace: kube-system
      labels:
        k8s-app: kubernetes-dashboard
        kubernetes.io/cluster-service: "true"
    spec:
      selector:
        matchLabels:
          k8s-app: kubernetes-dashboard
      template:
        metadata:
          labels:
            k8s-app: kubernetes-dashboard
          annotations:
            scheduler.alpha.kubernetes.io/critical-pod: ''
            scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
        spec:
          containers:
          - name: kubernetes-dashboard
            image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1
            resources:
              # keep request = limit to keep this container in guaranteed class
              limits:
                cpu: 100m
                memory: 50Mi
              requests:
                cpu: 100m
                memory: 50Mi
            command:
            - /dashboard
            - --port=9090
            - --apiserver-host=http://109.105.4.65:8080
            ports:
            - containerPort: 9090
            livenessProbe:
              httpGet:
                path: /
                port: 9090
              initialDelaySeconds: 30
              timeoutSeconds: 30
    --------------------------------------------------

    [root@mhc dashboard]# cat dashboard-service.yaml
    # This file should be kept in sync with cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-service.yaml
    apiVersion: v1
    kind: Service
    metadata:
      name: kubernetes-dashboard
      namespace: kube-system
      labels:
        k8s-app: kubernetes-dashboard
        kubernetes.io/cluster-service: "true"
    spec:
      selector:
        k8s-app: kubernetes-dashboard
      ports:
      - port: 80
        targetPort: 9090
    -----------------------------------------------------------

    kubectl create -f dashboard-controller.yaml

    kubectl create -f dashboard-service.yaml

    kubectl get pods -l k8s-app=kubernetes-dashboard --namespace=kube-system

    kubectl delete deployment -l k8s-app=kubernetes-dashboard --namespace=kube-system

  • 相关阅读:
    你的代码真的很健壮吗
    GAE 博客——B3log Solo 0.1.1 发布预告
    GAE 博客——B3log Solo 0.1.1 发布了!
    GAE 博客——B3log Solo 0.1.1 发布了!
    使用logcxx库和boost库构建系统日志的格式化输出
    Simple Hierarchical clustering in Python 2.7 using SciPy
    将python3.1+pyqt4打包成exe
    Installation — SIP 4.14.2 Reference Guide
    PyQt 维基百科,自由的百科全书
    沙湖王 py行者
  • 原文地址:https://www.cnblogs.com/mhc-fly/p/8406962.html
Copyright © 2011-2022 走看看