Question one:
# yum install -y etcd kubernetes Error: docker-ce-cli conflicts with 2:docker-1.13.1-94.gitb2f74b2.el7.centos.x86_64 Error: docker-ce conflicts with 2:docker-1.13.1-94.gitb2f74b2.el7.centos.x86_64
the reason:
Before installing kubernetes already installed docker
Solution: Uninstall docker Service
卸载docker:yum remove -y 'rpm -qa |grep docker'
Remove container Mirror: rm -rf / var / lib / docker
Install again kubernetes, successfully installed, and automatically install docker
Question two:
2.1
# etcdctl mk /atomic.io/network/config '{"Network":"192.168.3.4/16"}' Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:2379: connect: connection refused; error #1: dial tcp 127.0.0.1:4001: connect: connection refused error #0: dial tcp 127.0.0.1:2379: connect: connection refused error #1: dial tcp 127.0.0.1:4001: connect: connection refused
The reason:
If the above error occurs because ETCD_LISTEN_CLIENT_URLS configuration parameter is not http://127.0.0.1:2379 caused
Solution:
The ETCD_LISTEN_CLIENT_URLS parameter # /etc/etcd/etcd.conf was changed:
ETCD_LISTEN_CLIENT_URLS = "HTTP : //127.0.0.1: 2379 "
2.2
# etcdctl mk /atomic.io/network/config '{"Network":"192.168.3.4/16"}' Error: dial tcp 192.168.3.4:2379: connect: connection refused
the reason:
ETCD_LISTEN_CLIENT_URLS parameter is not configured local ip "http://192.168.3.4:2379" caused
Solution:
The # / etc / ETCD / ETCD_LISTEN_CLIENT_URLS etcd.conf was changed parameters:
ETCD_LISTEN_CLIENT_URLS = "http://192.168.37.49:2379,http://127.0.0.1:2379"
Question three: Start docker service failure
# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/docker.service.d └─flannel.conf Active: failed (Result: exit-code) since Tue 2019-06-25 11:16:41 CST; 4min 15s ago Docs: http://docs.docker.com Process: 20982 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE) Main PID: 20982 (code=exited, status=1/FAILURE) Jun 25 11:16:41 localhost.localdomain systemd[1]: Starting Docker Application Container Engine... Jun 25 11:16:41 localhost.localdomain dockerd-current[20982]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file:...rom file: 1500) Jun 25 11:16:41 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE Jun 25 11:16:41 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine. Jun 25 11:16:41 localhost.localdomain systemd[1]: Unit docker.service entered failed state. Jun 25 11:16:41 localhost.localdomain systemd[1]: docker.service failed.
The reason:
Before installing the remaining files installed kubernets docker affected kubernets installed docker start
Solution:
The / etc / docker / delete daemon.json, restart.
When you create a pod k8s management mysql: Question four:
# kubectl create -f mysql.yaml error: error validating "mysql.yaml": error validating data: couldn't find type: v1beta1.Deployment; if you choose to ignore these errors, turn validation off with --validate=false
原因:
kubectl 的版本是1.5版本的
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e", GitTreeState:"clean", BuildDate:"2017-07-03T15:31:10Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e", GitTreeState:"clean", BuildDate:"2017-07-03T15:31:10Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
解决方法:
将mysql.yaml脚本中的 “ apiVersion:apps / v1beta1 "changed to" apiVersion: Extensions / v1beta1 "to
Apiversion different explanation:
Apps API v1 group will be deployed position where the type of apps / v1beta1 has been added in version 1.6.0, so if you have a 1.5.x client or server, you should still use Extensions /. V1beta1 version.
apps / v1beta1 and extensions / v1beta1 deploy the same type, but when you create through apps API, will use some improvement default values