Closed oomichi closed 6 years ago
ubuntu 16.04 で発生するか、確認する。
$ nova boot --flavor m1.medium --image 7fd7db58-a369-4f0e-b596-35aab6df76f1 --key-name mykey k8s-1604
下記のとおり、ubuntu 16.04 では問題発生せず
# kubeadm init --pod-network-cidr=10.244.0.0/16
...
[init] This might take a minute or longer if the control plane images have to be pulled.
[apiclient] All control plane components are healthy after 69.502807 seconds
[uploadconfig]Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[markmaster] Will mark node k8s-1604 as master by adding a label and a taint
[markmaster] Master k8s-1604 tainted and labelled with key/value: node-role.kubernetes.io/master=""
[bootstraptoken] Using token: b0riz2.1ufwnc32j78yit4n
[bootstraptoken] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstraptoken] Configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstraptoken] Configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstraptoken] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[addons] Applied essential addon: kube-dns
[addons] Applied essential addon: kube-proxy
Your Kubernetes master has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/
You can now join any number of machines by running the following on each node
as root:
kubeadm join 192.168.1.115:6443 --token b0riz2.1ufwnc32j78yit4n --discovery-token-ca-cert-hash sha256:32bfc4fa9066db4f221fb1facfb667dda3ffdca2b81f78965a9d644857eff718
$
タイミング問題?(controller側のイメージ配布の問題?) もう一度 ubuntu 18.04 で試す。
もしかしたら
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
で xenial を指定しているから? 現時点で https://packages.cloud.google.com/apt/dists 配下に kubernetes-xenial はあるけど、kubernetes-bionic はないなぁ。現時点で ubuntu 18.04 は使えないのかも。
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
で指定されるサイトに 18.04 (bionic)向けが無いため、現時点で 18.04 上に k8s cluster を kubeadm でインストールするのは不可能として close する。
https://github.com/oomichi/try-kubernetes/issues/25 作業中に発生した問題