Statefulset Pod connect service slow

1/21/2019

I run my app in Kubernetes with helm. Everything is fine in my environment. But a strange event has happened in my customer environment.

  1. I have some Deployments and one StatefulSet
  2. I deployed postgresql using https://github.com/helm/charts/tree/master/stable/postgresql, and run only one pod (postgresql-0).
  3. My Deployment pod1 connect with postgresql using psql and need a few milliseconds only.
  4. My StatefulSet pod1 connect with postgresql using psql and need more than 10 seconds.
  5. Now only one master (No schedule) and one node. All my pods run in the same node.I think they are using docker0 brige?
  6. I used flannel.

What is the difference between Deployments pod network and StatefulSet pod network? Why the same connection commands have so different costs? How can I fix it?

Environment:

  • Kubernetes version (use $ kubectl version): v1.12.1
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): Centos 7.6
  • Kernel (e.g. uname -a):
  • Install tools: kubeadm
  • Others:
-- Bina
kubernetes

0 Answers