Skip to content

Instantly share code, notes, and snippets.

@alphajc
Last active July 12, 2019 23:43
Show Gist options
  • Save alphajc/ad56aa01da685d665c856551c4d18baf to your computer and use it in GitHub Desktop.
Save alphajc/ad56aa01da685d665c856551c4d18baf to your computer and use it in GitHub Desktop.
桌面版 Docker 在国内想要不翻墙直接使用自带的 Kubenetes,必须先 pull 镜像,脚本如下
#!/bin/bash
set -e
KUBE_VERSION=v1.10.11
KUBE_PAUSE_VERSION=3.1
ETCD_VERSION=3.1.12
DNS_VERSION=1.14.8
DOCKER_TOOL_VERSION=v0.4.12
GCR_URL=k8s.gcr.io
ALIYUN_URL=registry.cn-hangzhou.aliyuncs.com/google_containers
images=(kube-proxy-amd64:${KUBE_VERSION}
kube-scheduler-amd64:${KUBE_VERSION}
kube-controller-manager-amd64:${KUBE_VERSION}
kube-apiserver-amd64:${KUBE_VERSION}
pause-amd64:${KUBE_PAUSE_VERSION}
etcd-amd64:${ETCD_VERSION}
k8s-dns-sidecar-amd64:${DNS_VERSION}
k8s-dns-kube-dns-amd64:${DNS_VERSION}
k8s-dns-dnsmasq-nanny-amd64:${DNS_VERSION})
for image in ${images[@]} ; do
docker pull ${ALIYUN_URL}/${image}
docker tag ${ALIYUN_URL}/${image} ${GCR_URL}/${image}
docker rmi ${ALIYUN_URL}/${image}
done
# 拉取 Docker 相关镜像
docker pull docker/kube-compose-api-server:${DOCKER_TOOL_VERSION}
docker pull docker/kube-compose-controller:${DOCKER_TOOL_VERSION}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment