Things to try:

Log in to each VM and try accessing the service's clusterIP, eg with curl.

Make sure kube-proxy is running on both VMs.

Check kube-proxy logs for any obvious errors, like failure to sync with
master.

Try connecting to the VM IP on the service node port.



On Nov 22, 2017 5:49 AM, "Rodrigo Campos" <rodrig...@gmail.com> wrote:

If I have to bet, I'd bet it's the application.

But okay, that is what you see. But else do you see in Kubernetes? Logs of
kube-proxy, etc.?

How do you keep the users logged in the application? Is there any container
restart when this happens?

Are you using GKE? And how do you connect, via a public load balancer?

Tell us more about the app and your setup


On Wednesday, November 22, 2017, <tomnola...@gmail.com> wrote:

> Hi there,
>
> I’ve deployed an application to a Google Cloud Kubernete Cluster. The
> application is built using the Python web-framework Flask and uses a
> CloudSQL Postgres database for persistence. The script I used to deploy the
> application is this: https://gist.github.com/tnolan
> 8/85e91394d9ec1327f930808c71081aba -> the gist is actually slightly
> outdated and instead of a ReplicationController I’m now using a Deployment.
>
> When I have a single VM in my instance group for my Cluster and a singular
> pod deployed with the lb service running everything works fine, the
> application works just as intended. However when I scale to having two VMs
> in my instance group for my Cluster and keep only the one pod, so it’s
> essentially still only running on the one machine, I get unexpected
> behavior. For example, when logging into the application instead of
> actually logging in it will redirect to the homepage but 1/3 times it will
> actually log in.
>
> I don’t think it’s something to do with the application itself. Everything
> works okay locally and on a singular VM instance. I’ve tried looking
> through logs using StackDriver but I’m not really even sure what I should
> be looking for, there’s some weird disconnect occurring and I really can’t
> figure out why.
>
> Has anyone ever seen something like this? Any thoughts on what I could try
> to debug it or thoughts on what might actually be causing it?
>
> Much Appreciated,
>
> Tom.
>
> --
> 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.
>
-- 
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.

-- 
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.
  • [kubernetes-users]... tomnolan95
    • Re: [kubernet... Rodrigo Campos
      • Re: [kube... 'Tim Hockin' via Kubernetes user discussion and Q&A
      • Re: [kube... tomnolan95
        • Re: [... 'Tim Hockin' via Kubernetes user discussion and Q&A
          • R... tomnolan95
            • ... 'Tim Hockin' via Kubernetes user discussion and Q&A
              • ... tomnolan95
                • ... 'Tim Hockin' via Kubernetes user discussion and Q&A

Reply via email to