按照此页面上的说明 - http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html#setup,尝试使用Vagrant和VirtualBox在运行El Capitan的Mac上运行Kubernetes时出现以下错误。我哪里错了?
OS X El Capitan 10.11.2(15C50) 流浪者1.8.1 VirtualBox 5.0.12 r104815
并尝试通过执行以下步骤来启动群集:
export KUBERNETES_PROVIDER=vagrant
curl -sS https://get.k8s.io | bash
下面的输出是执行这两个命令的捕获。我正在按照这些说明[link] http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html#prerequisites
Unpacking kubernetes release v1.1.4
Creating a kubernetes on vagrant...
... Starting cluster using provider: vagrant
... calling verify-prereqs
... calling kube-up
Bringing machine 'master' up with 'virtualbox' provider...
Bringing machine 'minion-1' up with 'virtualbox' provider...
==> master: VirtualBox VM is already running.
==> minion-1: Importing base box 'kube-fedora21'...
==> minion-1: Matching MAC address for NAT networking...
==> minion-1: Setting the name of the VM: kubernetes_minion-1_1454028157203_24352
==> minion-1: Fixed port collision for 22 => 2222. Now on port 2200.
==> minion-1: Clearing any previously set network interfaces...
==> minion-1: Preparing network interfaces based on configuration...
minion-1: Adapter 1: nat
minion-1: Adapter 2: hostonly
==> minion-1: Forwarding ports...
minion-1: 22 (guest) => 2200 (host) (adapter 1)
==> minion-1: Running 'pre-boot' VM customizations...
==> minion-1: Booting VM...
==> minion-1: Waiting for machine to boot. This may take a few minutes...
minion-1: SSH address: 127.0.0.1:2200
minion-1: SSH username: vagrant
minion-1: SSH auth method: private key
minion-1:
minion-1: Vagrant insecure key detected. Vagrant will automatically replace
minion-1: this with a newly generated keypair for better security.
minion-1:
minion-1: Inserting generated public key within guest...
minion-1: Removing insecure key from the guest if it's present...
minion-1: Key inserted! Disconnecting and reconnecting using new SSH key...
==> minion-1: Machine booted and ready!
==> minion-1: Checking for guest additions in VM...
==> minion-1: Configuring and enabling network interfaces...
==> minion-1: Mounting shared folders...
minion-1: /vagrant => /Users/lee/kubernetes
==> minion-1: Running provisioner: shell...
minion-1: Running: /var/folders/cb/lpcc0zbs441777bwsl1zrcbh0000gn/T/vagrant-shell20160128-14233-gm7iq9.sh
==> minion-1: Adding kubernetes-master to hosts file
==> minion-1: Provisioning network on minion
==> minion-1: Resolving Dependencies
==> minion-1: --> Running transaction check
==> minion-1: ---> Package flannel.x86_64 0:0.5.0-3.fc21 will be installed
==> minion-1: --> Finished Dependency Resolution
==> minion-1:
==> minion-1: Dependencies Resolved
==> minion-1:
==> minion-1: ================================================================================
==> minion-1: Package Arch Version Repository Size
==> minion-1: ================================================================================
==> minion-1: Installing:
==> minion-1: flannel x86_64 0.5.0-3.fc21 updates 1.6 M
==> minion-1:
==> minion-1: Transaction Summary
==> minion-1: ================================================================================
==> minion-1: Install 1 Package
==> minion-1: Total download size: 1.6 M
==> minion-1: Installed size: 7.0 M
==> minion-1: Downloading packages:
==> minion-1: warning:
==> minion-1: /var/cache/yum/x86_64/21/updates/packages/flannel-0.5.0-3.fc21.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 95a43f54: NOKEY
==> minion-1: Public key for flannel-0.5.0-3.fc21.x86_64.rpm is not installed
==> minion-1: Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-21-x86_64
==> minion-1: Importing GPG key 0x95A43F54:
==> minion-1: Userid : "Fedora (21) <fedora@fedoraproject.org>"
==> minion-1: Fingerprint: 6596 b8fb abda 5227 a9c5 b59e 89ad 4e87 95a4 3f54
==> minion-1: Package : fedora-repos-21-2.noarch (@anaconda)
==> minion-1: From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-21-x86_64
==> minion-1: Running transaction check
==> minion-1: Running transaction test
==> minion-1: Transaction test succeeded
==> minion-1: Running transaction (shutdown inhibited)
==> minion-1: Installing : flannel-0.5.0-3.fc21.x86_64 1/1
==> minion-1:
==> minion-1: Verifying : flannel-0.5.0-3.fc21.x86_64 1/1
==> minion-1:
==> minion-1:
==> minion-1: Installed:
==> minion-1: flannel.x86_64 0:0.5.0-3.fc21
==> minion-1: Complete!
==> minion-1: Created symlink from /etc/systemd/system/docker.service.requires/flanneld.service to /usr/lib/systemd/system/flanneld.service.
==> minion-1: Network configuration verified
==> minion-1: Disable swap memory to ensure proper QoS
==> minion-1: * INFO: sh -- Version 2015.11.09
==> minion-1:
==> minion-1: * INFO: System Information:
==> minion-1: * INFO: CPU: GenuineIntel
==> minion-1: * INFO: CPU Arch: x86_64
==> minion-1: * INFO: OS Name: Linux
==> minion-1: * INFO: OS Version: 3.17.4-301.fc21.x86_64
==> minion-1: * INFO: Distribution: Fedora 21
==> minion-1: * INFO: Installing minion
==> minion-1: * INFO: Found function install_fedora_deps
==> minion-1: * INFO: Found function install_fedora_stable
==> minion-1: * INFO: Found function install_fedora_stable_post
==> minion-1: * INFO: Found function install_fedora_restart_daemons
==> minion-1: * INFO: Found function daemons_running
==> minion-1: * INFO: Found function install_fedora_check_services
==> minion-1: * INFO: Running install_fedora_deps()
==> minion-1: which: no dnf in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
==> minion-1: * INFO: Adding SaltStack's COPR repository
==> minion-1:
==> minion-1:
==> minion-1: File contains no section headers.
==> minion-1: file: file:///etc/yum.repos.d/saltstack-salt-fedora-21.repo, line: 1
==> minion-1: '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n'
==> minion-1: * ERROR: Failed to run install_fedora_deps()!!!
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
答案 0 :(得分:1)
您对流浪汉设置的问题目前是一个未解决的问题https://github.com/kubernetes/kubernetes/issues/20088#issuecomment-174528066。作为临时修复,您可以执行此操作以使其正常工作:https://stackoverflow.com/a/35015586/5834774