apiVersion: apps/v1 kind: Deployment metadata: name: oauth-backend namespace: oauth-system spec: replicas: 3 selector: matchLabels: app: oauth-backend template: metadata: labels: app: oauth-backend spec: containers: - name: backend image: ${NEXUS_URL}/oauth-backend:${VERSION} ports: - containerPort: 8000 envFrom: - configMapRef: name: oauth-config - secretRef: name: oauth-secret resources: requests: memory: "256Mi" cpu: "250m" limits: memory: "512Mi" cpu: "500m" --- apiVersion: apps/v1 kind: Deployment metadata: name: oauth-frontend namespace: oauth-system spec: replicas: 2 selector: matchLabels: app: oauth-frontend template: metadata: labels: app: oauth-frontend spec: containers: - name: frontend image: ${NEXUS_URL}/oauth-frontend:${VERSION} ports: - containerPort: 80 resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "256Mi" cpu: "200m" --- apiVersion: v1 kind: Service metadata: name: oauth-backend-service namespace: oauth-system spec: selector: app: oauth-backend ports: - protocol: TCP port: 8000 targetPort: 8000 type: ClusterIP --- apiVersion: v1 kind: Service metadata: name: oauth-frontend-service namespace: oauth-system spec: selector: app: oauth-frontend ports: - protocol: TCP port: 80 targetPort: 80 type: ClusterIP