kubeasz/manifests/dashboard/1.6.3/kubernetes-dashboard.yaml

101 lines
2.8 KiB
YAML
Raw Normal View History

2018-03-07 14:45:54 +08:00
# Copyright 2015 Google Inc. All Rights Reserved.
2018-01-31 09:31:45 +08:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Configuration to deploy release version of the Dashboard UI compatible with
2018-03-07 14:45:54 +08:00
# Kubernetes 1.6 (RBAC enabled).
2018-01-31 09:31:45 +08:00
#
# Example usage: kubectl create -f <this_file>
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
2018-03-07 14:45:54 +08:00
kind: ClusterRoleBinding
2018-01-31 09:31:45 +08:00
metadata:
2018-03-07 14:45:54 +08:00
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
2018-01-31 09:31:45 +08:00
roleRef:
apiGroup: rbac.authorization.k8s.io
2018-03-07 14:45:54 +08:00
kind: ClusterRole
name: cluster-admin
2018-01-31 09:31:45 +08:00
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system
---
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: kubernetes-dashboard
template:
metadata:
labels:
k8s-app: kubernetes-dashboard
spec:
containers:
- name: kubernetes-dashboard
2018-03-07 14:45:54 +08:00
#image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3
image: mirrorgooglecontainers/kubernetes-dashboard-amd64:v1.6.3
2018-01-31 09:31:45 +08:00
ports:
2018-03-07 14:45:54 +08:00
- containerPort: 9090
2018-01-31 09:31:45 +08:00
protocol: TCP
args:
# Uncomment the following line to manually specify Kubernetes API server Host
# If not specified, Dashboard will attempt to auto discover the API server and connect
# to it. Uncomment only if the default does not work.
# - --apiserver-host=http://my-address:port
livenessProbe:
httpGet:
path: /
2018-03-07 14:45:54 +08:00
port: 9090
2018-01-31 09:31:45 +08:00
initialDelaySeconds: 30
timeoutSeconds: 30
serviceAccountName: kubernetes-dashboard
# Comment the following tolerations if Dashboard must not be deployed on master
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
---
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
name: kubernetes-dashboard
namespace: kube-system
spec:
ports:
2018-03-07 14:45:54 +08:00
- port: 80
targetPort: 9090
2018-01-31 09:31:45 +08:00
selector:
k8s-app: kubernetes-dashboard
type: NodePort