apiVersion: v1 kind: ConfigMap metadata: name: todo-frontend-config data: BACKEND_URL: "http://:30001" # Update with your NodePort IP or LoadBalancer DNS --- apiVersion: apps/v1 kind: Deployment metadata: name: todo-frontend labels: app: todo-frontend spec: replicas: 2 selector: matchLabels: app: todo-frontend template: metadata: labels: app: todo-frontend spec: containers: - name: todo-frontend image: IMAGE_PATH_PLACEHOLDER ports: - containerPort: 3000 env: - name: PORT value: "3000" - name: BACKEND_URL valueFrom: configMapKeyRef: name: todo-frontend-config key: BACKEND_URL --- apiVersion: v1 kind: Service metadata: name: todo-frontend-service spec: type: NodePort selector: app: todo-frontend ports: - protocol: TCP port: 3000 targetPort: 3000 nodePort: 30000