美文网首页
docker安装

docker安装

作者: 书润之 | 来源:发表于2018-07-06 14:06 被阅读0次

k8s安装

whttp://blog.csdn.net/u013760355/article/details/68061976
补充说明:
注:etcdctl -C http://****:2379 set /atomic.io/network/config '{"Network":"172.17.0.0/16"}'这个命令nodes也要执行。Master如执行不成功,则执行etcdctl  set /atomic.io/network/config '{"Network":"172.17.0.0/16"}'
(http如果不加上,高版本会有问题)
/etc/kubernetes/apiserver中--service-cluster-ip-range=172.17.0.0/16(值要改成这样)
vim /etc/kubernetes/config 中KUBE_ALLOW_PRIV="--allow-privileged=true"(仅限node)
vim /etc/kubernetes/kubelet中KUBELET_ADDRESS="--address=0.0.0.0";KUBELET_ARGS="--cluster-dns=172.16.223.13 --cluster-domain=cluster.local. --allow-privileged=true"


nodes节点添加服务
(slave:)systemctl start flanneld  docker kubelet kube-proxy; systemctl enable flanneld  docker kubelet kube-proxy;


master:systemctl restart etcd kube-apiserver kube-scheduler kube-controller-manager 
slave:systemctl restart flanneld  docker  kubelet kube-proxy
nodes节点中/etc/etcd/etcd.conf的配置不用修改

说明:
1、service有clusterip和node port两个端口,一个是对内,一个是对外
whttp://www.jb51.net/article/94343.htm(dashbord安装教程)
whttp://www.tuicool.com/articles/B77vQj6(prometheus安装)

如果docker0:ip地址不对的话,重装docker和kubectl node就可以解决

版本:

Kubernetes v1.5.2
docker 1.12.6

### docker:
Client:
 Version: 1.12.6
 API version: 1.24
 Package version: docker-1.12.6-32.git88a4867.el7.centos.x86_64
 Go version: go1.7.4
 Git commit: 88a4867/1.12.6
 Built: Mon Jul 3 16:02:02 2017
 OS/Arch: linux/amd64
Server:
 Version: 1.12.6
 API version: 1.24
 Package version: docker-1.12.6-32.git88a4867.el7.centos.x86_64
 Go version: go1.7.4
 Git commit: 88a4867/1.12.6
 Built: Mon Jul 3 16:02:02 2017
 OS/Arch: linux/amd64

### kubernetes:
kubernetes-client.x86_64 1.5.2-0.7.git269f928.el7 @extras
kubernetes-node.x86_64 1.5.2-0.7.git269f928.el7 @extras
cockpit-kubernetes.x86_64 165-3.el7.centos extras
kubernetes.x86_64 1.5.2-0.7.git269f928.el7 extras
kubernetes-ansible.noarch 0.6.0-0.1.gitd65ebd5.el7 epel
kubernetes-master.x86_64 1.5.2-0.7.git269f928.el7 extras
kubernetes-unit-test.x86_64 1.5.2-0.7.git269f928.el7 extras

docker compose安装

下载最新版的docker-compose文件 
$ sudo curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
添加可执行权限 
$ sudo chmod +x /usr/local/bin/docker-compose
测试安装结果 
$ docker-compose --version 
docker-compose version 1.16.1, build 1719ceb

相关文章

网友评论

      本文标题:docker安装

      本文链接:https://www.haomeiwen.com/subject/qfkduftx.html