3 # ============LICENSE_START==========================================
4 # ===================================================================
5 # Copyright (c) 2017 AT&T
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #============LICENSE_END============================================
20 # this script will install dashboard on k8s master.
23 git clone -b release-1.5 https://github.com/kubernetes/heapster.git
25 kubectl create -f heapster/deploy/kube-config/influxdb/
26 kubectl create -f heapster/deploy/kube-config/rbac/heapster-rbac.yaml
29 kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernetes-dashboard.yaml
31 ##Change spec.type from ClusterIP to NodePort and save.
32 kubectl get svc kubernetes-dashboard --namespace=kube-system -o yaml | sed 's/type: ClusterIP/type: NodePort/' | kubectl replace -f -
34 cat <<EOF >>dashboard-admin.yaml
35 apiVersion: rbac.authorization.k8s.io/v1beta1
36 kind: ClusterRoleBinding
38 name: kubernetes-dashboard
40 k8s-app: kubernetes-dashboard
42 apiGroup: rbac.authorization.k8s.io
46 - kind: ServiceAccount
47 name: kubernetes-dashboard
48 namespace: kube-system
51 kubectl create -f dashboard-admin.yaml
54 wget http://storage.googleapis.com/kubernetes-helm/helm-$1-linux-amd64.tar.gz
55 tar -zxvf helm-$1-linux-amd64.tar.gz
56 sudo mv linux-amd64/helm /usr/bin/helm
58 kubectl -n kube-system create sa tiller
59 kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
60 helm init --service-account tiller