--- kind: ConfigMap apiVersion: v1 metadata: name: prod-apollo-adminservice data: application-github.properties: | spring.datasource.url = jdbc:mysql://192.168.122.37:3306/ApolloConfigDB_prod?characterEncoding=utf8 spring.datasource.username = root spring.datasource.password = 666666 --- kind: ConfigMap apiVersion: v1 metadata: name: prod-apollo-configservice data: application-github.properties: | spring.datasource.url = jdbc:mysql://192.168.122.37:3306/ApolloConfigDB_prod?characterEncoding=utf8 spring.datasource.username = root spring.datasource.password = 666666 apollo.config-service.url = http://prod-apollo-configservice.apolloconfig:8080 apollo.admin-service.url = http://prod-apollo-adminservice.apolloconfig:8090 --- kind: Service apiVersion: v1 metadata: name: prod-apollo-adminservice labels: app.kubernetes.io/version: "1.9.1" spec: type: ClusterIP ports: - name: http protocol: TCP port: 8090 targetPort: 8090 selector: app: prod-apollo-adminservice --- kind: Service apiVersion: v1 metadata: name: prod-apollo-configservice labels: app.kubernetes.io/version: "1.9.1" spec: type: ClusterIP ports: - name: http protocol: TCP port: 8080 targetPort: 8080 selector: app: prod-apollo-configservice --- kind: Deployment apiVersion: apps/v1 metadata: name: prod-apollo-adminservice labels: app.kubernetes.io/version: "1.9.1" spec: replicas: 3 selector: matchLabels: app: prod-apollo-adminservice template: metadata: labels: app: prod-apollo-adminservice spec: volumes: - name: volume-configmap-prod-apollo-adminservice configMap: name: prod-apollo-adminservice items: - key: application-github.properties path: application-github.properties defaultMode: 420 containers: - name: apollo-adminservice image: "apolloconfig/apollo-adminservice:1.9.1" imagePullPolicy: IfNotPresent ports: - name: http containerPort: 8090 protocol: TCP env: - name: SPRING_PROFILES_ACTIVE value: "github,kubernetes" volumeMounts: - name: volume-configmap-prod-apollo-adminservice mountPath: /apollo-adminservice/config/application-github.properties subPath: application-github.properties livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 100 periodSeconds: 10 readinessProbe: httpGet: path: /health port: 8090 initialDelaySeconds: 30 periodSeconds: 5 resources: {} --- kind: Deployment apiVersion: apps/v1 metadata: name: prod-apollo-configservice labels: app.kubernetes.io/version: "1.9.1" spec: replicas: 3 selector: matchLabels: app: prod-apollo-configservice template: metadata: labels: app: prod-apollo-configservice spec: volumes: - name: volume-configmap-prod-apollo-configservice configMap: name: prod-apollo-configservice items: - key: application-github.properties path: application-github.properties defaultMode: 420 containers: - name: apollo-configservice image: "apolloconfig/apollo-configservice:1.9.1" imagePullPolicy: IfNotPresent ports: - name: http containerPort: 8080 protocol: TCP env: - name: SPRING_PROFILES_ACTIVE value: "github,kubernetes" volumeMounts: - name: volume-configmap-prod-apollo-configservice mountPath: /apollo-configservice/config/application-github.properties subPath: application-github.properties livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 100 periodSeconds: 10 readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 5 resources: {} --- --- --- --- ---