I run my app in Kubernetes with helm. Everything is fine in my environment. But a strange event has happened in my customer environment.
- I have some Deployments and one StatefulSet
- I deployed postgresql using https://github.com/helm/charts/tree/master/stable/postgresql, and run only one pod (postgresql-0).
- My Deployment pod1 connect with postgresql using psql and need a few milliseconds only.
- My StatefulSet pod1 connect with postgresql using psql and need more than 10 seconds.
- Now only one master (No schedule) and one node. All my pods run in the same node.I think they are using docker0 brige?
- 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: