--- apiVersion: apps/v1 kind: Deployment metadata: name: games-console-backend namespace: infrastructure spec: replicas: 2 selector: matchLabels: app: games-console-backend template: metadata: labels: app: games-console-backend spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchLabels: app: games-console-backend topologyKey: kubernetes.io/hostname serviceAccountName: games-console containers: - name: backend image: games-console-backend:latest imagePullPolicy: Never args: ["serve", "--namespace", "games"] ports: - containerPort: 8080 resources: requests: cpu: 50m memory: 64Mi limits: cpu: 500m memory: 256Mi livenessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 5 periodSeconds: 15 --- apiVersion: v1 kind: Service metadata: name: games-console-backend namespace: infrastructure spec: selector: app: games-console-backend ports: - port: 8080 targetPort: 8080 protocol: TCP type: ClusterIP --- apiVersion: v1 kind: Service metadata: name: games-console-backend-np namespace: infrastructure spec: selector: app: games-console-backend ports: - port: 8080 targetPort: 8080 nodePort: 31600 protocol: TCP type: NodePort