问题
解决:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
--- 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 |