Created
January 15, 2018 16:36
-
-
Save kostyrev/bbb38e3da35fe849788377a0ad64a5e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- Dashboard Service Account ------------------- # | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
k8s-app: kubernetes-dashboard | |
name: kubernetes-dashboard | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: kubernetes-dashboard | |
labels: | |
k8s-app: kubernetes-dashboard | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: cluster-admin | |
subjects: | |
- kind: ServiceAccount | |
name: kubernetes-dashboard | |
namespace: kube-system | |
--- | |
# ------------------- Dashboard Deployment ------------------- # | |
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
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 | |
image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.7.0 | |
ports: | |
- containerPort: 9090 | |
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: / | |
port: 9090 | |
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 | |
--- | |
# ------------------- Dashboard Service ------------------- # | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
labels: | |
k8s-app: kubernetes-dashboard | |
name: kubernetes-dashboard | |
namespace: kube-system | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 9090 | |
selector: | |
k8s-app: kubernetes-dashboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment