Я работаю с настройкой Vagrant Kubernetes 0.9.3 на Mac OSX.Невозможно получить доступ к Интернету из контейнеров Kubernetes
Окружающая среда:
- Kubernetes 0.9.3
- Vagrant 1.7.2
- VirtualBox-4.3.20-96996-OSX
Я могу успешно развертывать образы и запуск контейнеров в одной окружающей среде миньона:
ведущий
minion-1
Я не могу получить доступ к Интернету из работающего контейнера. Я могу получить доступ к Интернету с машины minion-1.
I Настройка среды с помощью Vagrant
/kubernetes$ export KUBERNETES_PROVIDER=vagrant
/kubernetes$ vagrant up
... (журналы инициализации и успешной установки мастера + миньона-1 в Virtualbox)
SSH в машину миньон-1 для обеспечения подключения к Интернету
/kubernetes$ vagrant ssh minion-1
[[email protected] ~]$ ping google.com
PING google.com (173.194.123.37) 56(84) bytes of data.
64 bytes from lga15s47-in-f5.1e100.net (173.194.123.37): icmp_seq=1 ttl=63 time=89.3 ms
предыдущий был успешным в соединении
Ниже вы можете видеть, что контейнер, похоже, не имеет доступа к Интернету.
[[email protected] ~]$ sudo docker run -it --rm ubuntu /bin/bash
Unable to find image 'ubuntu:latest' locally
ubuntu:latest: The image you are pulling has been verified
27d47432a69b: Downloading [=============================================> ] 180.6 MB/197.2 MB 44s
5f92234dcf1e: Download complete
51a9c7c1f8bb: Download complete
5ba9dab47459: Download complete
511136ea3c5a: Already exists
27d47432a69b: Pull complete
5f92234dcf1e: Pull complete
51a9c7c1f8bb: Pull complete
5ba9dab47459: Pull complete
Status: Downloaded newer image for ubuntu:latest
Внутри Ubuntu контейнера
[email protected]:/# ping google.com
ping: unknown host google.com
[email protected]:/# sudo apt-get update
Err http://archive.ubuntu.com trusty InRelease
Err http://archive.ubuntu.com trusty-updates InRelease
Err http://archive.ubuntu.com trusty-security InRelease
Err http://archive.ubuntu.com trusty Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-security Release.gpg
Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
[email protected]:/#
Это проблема с установкой Бродячей или это намеренное в рамках Kubernetes? Если да, то какой способ доступа к Интернету?
Благодарим вас за разъяснение. В инструкциях на веб-странице https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/vagrant.md указано, что установка 'net-tools'. Это применимо для Mac OSX? – Beggs