keycloak k8s 多副本
apiVersion: v1 kind: Service metadata: name: keycloak labels: app: keycloak spec: ports: - name: http5 port: 8084 targetPort: 8080 selector: app: keycloak clusterIP: None --- apiVersion: apps/v1 kind: Deployment metadata: name: keycloak labels: app: keycloak spec: replicas: 2 selector: matchLabels: app: keycloak template: metadata: labels: app: keycloak spec: containers: - name: keycloak image: quay.io/keycloak/keycloak:22.0.3 args: ["start-dev"] env: - name: KEYCLOAK_ADMIN value: "admin" - name: KEYCLOAK_ADMIN_PASSWORD value: "admin" - name: KC_PROXY value: "edge" - name: JAVA_OPTS value: -Djgroups.dns.query=keycloak.default.svc.cluster.local - name: KC_CACHE value: ispn - name: KC_CACHE_STACK value: kubernetes ports: - name: http containerPort: 8080
apiVersion: v1 kind: Service metadata: name: keycloak labels: app: keycloak spec: ports: - name: http5 port: 8084 targetPort: 8080 selector: app: keycloak clusterIP: None --- apiVersion: apps/v1 kind: Deployment metadata: name: keycloak labels: app: keycloak spec: replicas: 2 selector: matchLabels: app: keycloak template: metadata: labels: app: keycloak spec: containers: - name: keycloak image: quay.io/keycloak/keycloak:22.0.3 args: ["start-dev"] env: - name: KEYCLOAK_ADMIN value: "admin" - name: KEYCLOAK_ADMIN_PASSWORD value: "admin" - name: KC_PROXY value: "edge" - name: JAVA_OPTS value: -Djgroups.dns.query=keycloak.default.svc.cluster.local - name: KC_CACHE value: ispn - name: KC_CACHE_STACK value: kubernetes ports: - name: http containerPort: 8080 标签:副本,name,app,labels,value,k8s,spec,keycloak From: https://www.cnblogs.com/qgbo/p/17708392.html