云计算KubernetesDevOps

Downloading or Building Kubernet

2016-07-29  本文已影响527人  菲胖

这个问题应该是由于代理没有设置好的缘故。可是我设置了两处代理,都还是不行
export http_proxy=http://usrname:pswd@proxy.com:port
export https_proxy=https://usrname:pswd@proxy.com:port
export ftp_proxy=ftp://usrname:pswd@proxy.com:port
export all_proxy=http://usrname:pswd@proxy.com:port
添加
export KUBERNETES_HTTPS_PROXY=https://usrname:pswd@proxy.com:port
export KUBERNETES_HTTP_PROXY=http://usrname:pswd@proxy.com:port
原来还要设置docker的代理.
ubuntu: /etc/defautl/docker
export http_proxy="http://usrname:pswd@proxy.com:port"
export https_proxy="https://usrname:pswd@proxy.com:port"
接着就会出现另一个问题:
~/kubernetes-master$ docker build -t kube-build:build-cf5c558a5d --pull=false /usr1/s00295316/kubernetes-master/_output/images/kube-build:build-cf5c558a5d Sending build context to Docker daemon 140.8 MB Step 1 : FROM gcr.io/google_containers/kube-cross:v1.6.3-0 Get https://gcr.io/v1/_ping: x509: certificate signed by unknown authority
需要在demon中添加参数--insecure-registry gcr.io
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry gcr.io"
配置这些参数都需要重启
sudo service docker restart
或者
sudo service docker stop # to stop the service
sudo docker -d --insecure-registry gcr.io

官方guide

** 要求 **

  1. Docker
    Mac OS X:可以使用docker-machine或者boot2docker.
    Note: 设置 boot2docker vm 至少有3GB的初始内存,否则会失败 (See:#11852);不要从/tmp/中make quick-release。 (See: #14773)
    Linux with local Dockerinstructions
  2. Python
  3. Google Cloud SDK (可选)

** 脚本 **

自动下载并建立一个默认的cluster

# wget version
export KUBERNETES_PROVIDER=YOUR_PROVIDER; wget -q -O - https://get.k8s.io | bash
# curl version
export KUBERNETES_PROVIDER=YOUR_PROVIDER; curl -sS https://get.k8s.io | bash
上一篇 下一篇

猜你喜欢

热点阅读