Commit 2f5e50a4 by 蒋勇

d

parent e4e3fddf
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
# Copyright 2017 The Kubernetes Authors.
#
# 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
# Kubernetes 1.8.
#
# Example usage: kubectl create -f <this_file>
# ------------------- Dashboard Secret ------------------- #
apiVersion: v1
kind: Secret
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-certs
namespace: kube-system
type: Opaque
---
# ------------------- Dashboard Service Account ------------------- #
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
---
# ------------------- Dashboard Role & Role Binding ------------------- #
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kubernetes-dashboard-minimal
namespace: kube-system
rules:
# Allow Dashboard to create 'kubernetes-dashboard2-key-holder' secret.
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create"]
# Allow Dashboard to create 'kubernetes-dashboard2-settings' config map.
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create"]
# Allow Dashboard to get, update and delete Dashboard exclusive secrets.
- apiGroups: [""]
resources: ["secrets"]
resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs"]
verbs: ["get", "update", "delete"]
# Allow Dashboard to get and update 'kubernetes-dashboard2-settings' config map.
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["kubernetes-dashboard-settings"]
verbs: ["get", "update"]
# Allow Dashboard to get metrics from heapster.
- apiGroups: [""]
resources: ["services"]
resourceNames: ["heapster"]
verbs: ["proxy"]
- apiGroups: [""]
resources: ["services/proxy"]
resourceNames: ["heapster", "http:heapster:", "https:heapster:"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard-minimal
# namespace: kube-system
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: 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
image: kubernets/kubernetes-dashboard-amd64
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
protocol: TCP
args:
- --auto-generate-certificates
# 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 kube-system does not work.
# - --apiserver-host=http://my-address:port
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
# Create on-disk volume to store exec logs
- mountPath: /tmp
name: tmp-volume
livenessProbe:
httpGet:
scheme: HTTPS
path: /
port: 8443
initialDelaySeconds: 30
timeoutSeconds: 30
volumes:
- name: kubernetes-dashboard-certs
secret:
secretName: kubernetes-dashboard-certs
- name: tmp-volume
emptyDir: {}
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:
type: NodePort
ports:
- port: 80
targetPort: 8443
nodePort: 30000
selector:
k8s-app: kubernetes-dashboard
#kubectl get secrets | grep kubernetes-dashboard | awk '{print $1}'
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: k8-manage-ingress
namespace: kubernetes-dashboard
annotations:
configuration.konghq.com: kongingress-strip-path
spec:
rules:
- host: k8.qudao.gongsibao.com
http:
paths:
- path: /
backend:
serviceName: kubernetes-dashboard
servicePort: 80
\ No newline at end of file
...@@ -9,9 +9,9 @@ data: ...@@ -9,9 +9,9 @@ data:
DB_PORT: "33062" DB_PORT: "33062"
DB_USER: bp DB_USER: bp
DB_PWD: M0TaGe4f3kNnXanO%r DB_PWD: M0TaGe4f3kNnXanO%r
REDIS_HOST: r-2ze60261d9063784.redis.rds.aliyuncs.com REDIS_HOST: 172.19.99.60
REDIS_PORT: "6379" REDIS_PORT: "6379"
REDIS_PWD: Gongsibao2018 REDIS_PWD: 7nfykFyqE9Mhna9ge1
PAAS_DB_NAME: paas PAAS_DB_NAME: paas
PAAS_REDIS_DB: "14" PAAS_REDIS_DB: "14"
NODE_PORT: "80" NODE_PORT: "80"
...@@ -71,7 +71,7 @@ spec: ...@@ -71,7 +71,7 @@ spec:
- name: KONG_PG_HOST - name: KONG_PG_HOST
value: 36.112.135.172 value: 36.112.135.172
- name: KONG_PG_DATABASE - name: KONG_PG_DATABASE
value: kong value: kongty
- name: KONG_PG_USER - name: KONG_PG_USER
value: kong value: kong
- name: KONG_PG_PASSWORD - name: KONG_PG_PASSWORD
......
...@@ -39,7 +39,7 @@ spec: ...@@ -39,7 +39,7 @@ spec:
image: pantsel/konga image: pantsel/konga
env: env:
- name: DB_DATABASE - name: DB_DATABASE
value: k8s_konga value: kongaty
- name: DB_USER - name: DB_USER
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:
......
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kong-manage-ingress
namespace: kong
annotations:
configuration.konghq.com: kongingress-strip-path
spec:
rules:
- host: konga.qudao.gongsibao.com
http:
paths:
- path: /
backend:
serviceName: konga
servicePort: 80
\ No newline at end of file
...@@ -467,7 +467,7 @@ spec: ...@@ -467,7 +467,7 @@ spec:
port: 80 port: 80
protocol: TCP protocol: TCP
targetPort: 8000 targetPort: 8000
nodePort: 26981 nodePort: 31981
- name: proxy-ssl - name: proxy-ssl
port: 443 port: 443
protocol: TCP protocol: TCP
......
docker run --rm -e "KONG_PG_PORT=55634" -e "KONG_DATABASE=postgres" -e "KONG_PG_DATABASE=kongty" -e "KONG_PG_HOST=36.112.135.172" -e "KONG_PG_USER=kong" -e "KONG_PG_PASSWORD=krCcr3AAzvWvAf" -e "KONG_CASSANDRA_CONTACT_POINTS=kong" registry.cn-beijing.aliyuncs.com/hantang2/imgshare:777.77.10 kong migrations bootstrap
\ No newline at end of file
...@@ -26,7 +26,7 @@ metadata: ...@@ -26,7 +26,7 @@ metadata:
spec: spec:
ports: ports:
- name: http - name: http
port: 15672 port: 80
protocol: TCP protocol: TCP
targetPort: 15672 targetPort: 15672
nodePort: 31672 nodePort: 31672
......
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: amqp-manage-ingress
namespace: rabbitmq
annotations:
configuration.konghq.com: kongingress-strip-path
spec:
rules:
- host: mq.qudao.gongsibao.com
http:
paths:
- path: /
backend:
serviceName: rabbitmq-cluster-manage
servicePort: 15672
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment