Occasionally pods cannot create outbound connections
What happened:
Pods running on AKS occasionally are unable to connect to external hosts, as in these logs from a GitLab runner:
...
Checking out 4cd6c87a as master...
Skipping Git submodules setup
$ # Azure Container Registry Build variable overrides # collapsed multi-line command
$ # Auto DevOps variables and functions # collapsed multi-line command
$ check_kube_domain
$ install_dependencies
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/2) Installing gzip (1.8-r0)
(2/2) Installing tar (1.29-r1)
Executing busybox-1.27.2-r7.trigger
OK: 55 MiB in 56 packages
wget: bad address 'raw.githubusercontent.com'
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1
Restarting the pod in question (or retrying the job) eventually resolves the issue.
What you expected to happen:
All pods should be able to connect to external hosts by default.
How to reproduce it (as minimally and precisely as possible):
I have no idea. It appears the problems began when I scaled the cluster up to two nodes from one. The cluster was created using the ARM template at the following gist:
https://gist.github.com/AaronFriel/c6f4c56602ab167ff996969374aaada5
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version): 1.10.5 - Size of cluster (how many worker nodes are in the cluster?): 2
- General description of workloads in the cluster (e.g. HTTP microservices, Java app, Ruby on Rails, machine learning, etc.): GitLab, Wordpress, NFS-Server-Provisioner (two instances), a handful of smaller services
- Others: The cluster was created with
maxPods: 100.
Hypothesis:
Is the Azure CNI plugin not working correctly with the additional IP addresses?
@AaronFriel Should this be closed?
I think so, the issue appears to have been resolved by an upgrade of the AKS cluster.