--- apiVersion: v1 kind: Namespace metadata: name: yaobank labels: istio-injection: disabled --- apiVersion: v1 kind: Service metadata: name: database namespace: yaobank labels: app: database spec: ports: - port: 2379 name: http selector: app: database --- apiVersion: v1 kind: ServiceAccount metadata: name: database namespace: yaobank labels: app: yaobank --- apiVersion: apps/v1 kind: Deployment metadata: name: database namespace: yaobank spec: selector: matchLabels: app: database version: v1 replicas: 1 template: metadata: labels: app: database version: v1 spec: serviceAccountName: database containers: - name: database image: calico/yaobank-database:multiarch env: - name: ETCD_UNSUPPORTED_ARCH value: "arm64" imagePullPolicy: IfNotPresent ports: - containerPort: 2379 command: ["etcd"] args: - "-advertise-client-urls" - "http://database:2379" - "-listen-client-urls" - "http://0.0.0.0:2379" nodeSelector: kubernetes.io/hostname: node2 --- apiVersion: v1 kind: Service metadata: name: summary namespace: yaobank labels: app: summary spec: ports: - port: 80 name: http selector: app: summary --- apiVersion: v1 kind: ServiceAccount metadata: name: summary namespace: yaobank labels: app: yaobank database: reader --- apiVersion: apps/v1 kind: Deployment metadata: name: summary namespace: yaobank spec: replicas: 2 selector: matchLabels: app: summary version: v1 template: metadata: labels: app: summary version: v1 spec: serviceAccountName: summary containers: - name: summary image: calico/yaobank-summary:multiarch imagePullPolicy: Always ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: customer namespace: yaobank labels: app: customer spec: type: NodePort ports: - port: 80 nodePort: 30180 name: http selector: app: customer --- apiVersion: v1 kind: ServiceAccount metadata: name: customer namespace: yaobank labels: app: yaobank summary: reader --- apiVersion: apps/v1 kind: Deployment metadata: name: customer namespace: yaobank spec: replicas: 1 selector: matchLabels: app: customer version: v1 template: metadata: labels: app: customer version: v1 spec: serviceAccountName: customer containers: - name: customer image: calico/yaobank-customer:multiarch imagePullPolicy: Always ports: - containerPort: 80 nodeSelector: kubernetes.io/hostname: node1 ---