2018年8月1日 | Leave a comment 问题 解决: --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: keycloak-deploy-dev spec: replicas: 1 template: metadata: labels: app: keycloak-dev spec: containers: - name: keycloak-dev image: jboss/keycloak ports: - containerPort: 8080 env: - name: KEYCLOAK_USER value: admin - name: KEYCLOAK_PASSWORD value: 123456 - name: DB_VENDOR value: mysql - name: DB_ADDR value: 172.18.255.138 - name: DB_PORT value: "3306" - name: DB_DATABASE value: keycloak - name: DB_USER value: root - name: DB_PASSWORD value: "123456" --- apiVersion: v1 kind: Service metadata: name: keycloak-service-dev spec: selector: app: keycloak-dev ports: - name: http protocol: TCP port: 80 targetPort: 8080 type: LoadBalancer 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 ---apiVersion: extensions/v1beta1kind: Deploymentmetadata: name: keycloak-deploy-devspec: replicas: 1 template: metadata: labels: app: keycloak-dev spec: containers: - name: keycloak-dev image: jboss/keycloak ports: - containerPort: 8080 env: - name: KEYCLOAK_USER value: admin - name: KEYCLOAK_PASSWORD value: 123456 - name: DB_VENDOR value: mysql - name: DB_ADDR value: 172.18.255.138 - name: DB_PORT value: "3306" - name: DB_DATABASE value: keycloak - name: DB_USER value: root - name: DB_PASSWORD value: "123456" ---apiVersion: v1kind: Servicemetadata: name: keycloak-service-devspec: selector: app: keycloak-dev ports: - name: http protocol: TCP port: 80 targetPort: 8080 type: LoadBalancer