设置docker代理
william@aurix-builder:~$ cat ~/.docker/config.json
{
"proxies":
{
"default":
{
"httpProxy": "http://proxy.xxx.com:8080",
"httpsProxy": "http://proxy.xxx.com:8080",
"noProxy": "*.xxx.com"
}
}
}
设置microk8s代理
$ sudo vim /var/snap/microk8s/current/args/containerd-env
添加以下内容
HTTP_PROXY=http://<HTTP代理地址>
HTTPS_PROXY=http://<HTTP代理地址>
接着重启 microk8s:
$ microk8s.stop
$ microk8s.start
$ microk8s.status
添加 kubectl alias:
$ sudo snap alias microk8s.kubectl kubectl
$ type kubectl
kubectl is /snap/bin/kubectl
网友评论