Install Docker
Following Kubernetes's recommendation, we are choosing docker-1.13.1 as our container.
# yum install docker-1.13.1
Copy the Registry's certs to docker cert folder. Do the step for all of the nodes.
This step is not required, just only for your existing private docker registry.
# scp -r ca.crt sokm1:/etc/docker/certs.d/
Add proxy settings for Docker. As Kubernetes's images from Google are needed, so proxy is required.
Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable.
Or, if you are behind an HTTPS proxy server, create a file called /etc/systemd/system/docker.service.d/https-proxy.conf that adds the HTTPS_PROXY environment variable.
# mkdir -p /etc/systemd/system/docker.service.d/
# vi /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://196.168.0.127:8118/" "NO_PROXY=localhost,127.0.0.1,180.169.188.90,hub.docker.gemii.cc,192.168.0.169"
#
# vi /etc/systemd/system/docker.service.d/https-proxy.conf
[Service]
Environment="HTTP_PROXY=http://192.168.0.127:8118/" "NO_PROXY=localhost,127.0.0.1,180.169.188.90,hub.docker.gemii.cc,192.168.0.169"
Configure Docker storage
Here we created a disk /dev/sdb already.
# vi /etc/docker/daemon.json
{
"storage-driver": "overlay2",
"storage-opts": ["overlay2.override_kernel_check=true"]
}
# systemctl restart docker
网友评论