2018-05-07 05:43:32.363316 I | etcdmain: etcd Version: 3.1.12
2018-05-07 05:43:32.363496 I | etcdmain: Git SHA: 918698add
2018-05-07 05:43:32.363532 I | etcdmain: Go Version: go1.8.7
2018-05-07 05:43:32.363584 I | etcdmain: Go OS/Arch: linux/amd64
2018-05-07 05:43:32.363604 I | etcdmain: setting maximum number of CPUs to 3, total number of available CPUs is 3
2018-05-07 05:43:32.363705 I | embed: peerTLS: cert = /etc/kubernetes/pki/etcd/peer.crt, key = /etc/kubernetes/pki/etcd/peer.key, ca = , trusted-ca = /etc/kubernetes/pki/etcd/ca.crt, client-cert-auth = true
2018-05-07 05:43:32.363877 W | embed: The scheme of peer url http://localhost:2380 is HTTP while peer key/cert files are presented. Ignored peer key/cert files.
2018-05-07 05:43:32.363905 W | embed: The scheme of peer url http://localhost:2380 is HTTP while client cert auth (--peer-client-cert-auth) is enabled. Ignored client cert auth for this url.
2018-05-07 05:43:32.366129 C | etcdmain: listen tcp 104.238.186.14:2380: bind: cannot assign requested address

kubeadm 安装时指定配置文件,具体可以参考 kubeadm-init

kubeadm init --config=/etc/kubeadm/kubeadm.yaml --ignore-preflight-errors=Swap

cat /etc/kubeadm/kubeadm.yaml
piVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
nodeName: c2
api:
  advertiseAddress: 10.10.10.2
etcd:
  extraArgs:
    'listen-peer-urls': 'https://127.0.0.1:2380'
networking:
  podSubnet: 192.168.0.0/16
  serviceSubnet: 10.96.0.0/12

防火墙规则

# 如果重装可能因为防火墙规则导致calico无法启动
iptables -F
iptables -X
iptables -Z