Don't know about Google cloud, but if you use the service aa type load balancer, doesn't that create a load balancer with static IP address?
On Monday, November 21, 2016, Wiktor Tomczak <wiktor.tomc...@gmail.com> wrote: > > Hello, > > I'd like to run two different containers, each with a different > executable, on the same specific external IP address in Google Container > Engine (GKE). One executable is a web server and the other is a web client. > Requests from the client should originate from the same IP that the server > listens on. > > So far I've been able to get the client executable to run on an external > IP address that I had reserved via Networking > External IP addresses in > the cloud console [1]. The address is assigned to my only VM instance, so > IIUC all containers running there use this address for their outgoing IP > traffic. I can confirm the external IP address eg. by attaching to a > running container [2] and fetching checkip.dyndns.org from there [3]. > > OTOH, I haven't been able to expose the server executable on the same IP > address. I tried both .yaml service configuration and kubectl expose but > can't get either to work. What should be the value of my service's > spec.type? If I set type = LoadBalancer and LoadBalancerIP = <my external > IP above>, load balancer creation fails because the IP is reported as > already used. If I set type = NodePort, the service gets created, but > requests to <my external IP>:8080 aren't forwarded to the server executable > (configured to listen on port 8080). > > I'd appreciate any help. > > Wiktor > > [1] https://console.cloud.google.com/networking/addresses/list > [2] kubectl run -ti <pod name> -- /bin/bash > [3] curl checkip.dyndns.org > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com > <javascript:_e(%7B%7D,'cvml','kubernetes-users%2bunsubscr...@googlegroups.com');> > . > To post to this group, send email to kubernetes-users@googlegroups.com > <javascript:_e(%7B%7D,'cvml','kubernetes-users@googlegroups.com');>. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.