How would I configure the service and/or ingress to handle bringing up and down hundreds of these deployments based on the following constraints:
- This deployment is
foo-1
, subsequent ones would be named uniquely - Each deployment maps to 1 unique pod (the meta name and replicas handles this)
- Each pod is accessible on 2 unique ports
- Ports will be assigned, like when using
NodePort
- All pods should be accessible from the same IP
- I can use a LoadBalancer, but not one for each deployment
- If it makes sense to use something besides deployments, that is fine
Deployments will be created and deleted individually, not as a group
apiVersion: apps/v1 kind: Deployment metadata: name: foo-1 labels: app: foo spec: replicas: 1 selector: matchLabels: app: foo template: metadata: labels: app: foo spec: containers: - name: foo image: bar/baz:latest ports: - containerPort: 83 name: listen - containerPort: 85 name: serve
I'm using GKE which I believe has a firewall that's preventing me from accessing the nodes directly. I'm not opposed to disabling the firewall, but I'd prefer to do this through a LoadBalancer if possible.