stefanprodan / k8s-scw-baremetal

Kubernetes installer for Scaleway bare-metal AMD64 and ARMv7
MIT License
177 stars 58 forks source link

Easier terraform choice of docker and ubuntu versions #39

Closed stephenmoloney closed 5 years ago

stephenmoloney commented 5 years ago

Note: Pending merge of #38 in the first instance.

What does this commit/MR/PR do?

Testing carried out as follows:


arch: arm k8s_version: 1.12 os: Ubuntu Xenial

terraform apply \
 -var region=par1 \
 -var arch=arm \
 -var server_type=C1 \
 -var nodes=1 \
 -var server_type_node=C1 \
 -var weave_passwd=ChangeMe \
 -var docker_version=18.06 \
 -var ubuntu_version="Ubuntu Xenial" \
 -var k8s_version=stable-1.12 \
 -var kubeadm_verbosity=4 \
 --auto-approve
root@arm-master-1:~# kubectl get pods --all-namespaces
NAMESPACE     NAME                                   READY   STATUS    RESTARTS   AGE
kube-system   coredns-576cbf47c7-kndct               1/1     Running   0          21m
kube-system   coredns-576cbf47c7-m8j4g               1/1     Running   0          21m
kube-system   etcd-arm-master-1                      1/1     Running   0          20m
kube-system   heapster-97b5f7cc5-gd7tf               1/1     Running   0          21m
kube-system   kube-apiserver-arm-master-1            1/1     Running   0          20m
kube-system   kube-controller-manager-arm-master-1   1/1     Running   0          21m
kube-system   kube-proxy-lk6ql                       1/1     Running   0          14m
kube-system   kube-proxy-nfhxs                       1/1     Running   0          21m
kube-system   kube-scheduler-arm-master-1            1/1     Running   0          20m
kube-system   kubernetes-dashboard-86c855b57-r6krt   1/1     Running   0          21m
kube-system   metrics-server-85984bff87-cj9vg        1/1     Running   0          21m
kube-system   weave-net-j9qvr                        2/2     Running   0          14m
kube-system   weave-net-qn7f8                        2/2     Running   0          21m
NAME           STATUS   ROLES    AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION          CONTAINER-RUNTIME
arm-master-1   Ready    master   22m   v1.12.4   <private>   <none>        Ubuntu 16.04.5 LTS   4.4.127-mainline-rev1   docker://18.6.1
arm-node-1     Ready    <none>   15m   v1.12.4   <private>    <none>        Ubuntu 16.04.5 LTS   4.4.127-mainline-rev1   docker://18.6.1

arch: arm k8s_version: 1.12 os: Ubuntu Bionic

terraform apply \
 -var region=par1 \
 -var arch=arm \
 -var server_type=C1 \
 -var nodes=1 \
 -var server_type_node=C1 \
 -var weave_passwd=ChangeMe \
 -var docker_version=18.06 \
 -var ubuntu_version="Ubuntu Bionic" \
 -var k8s_version=stable-1.12 \
 -var kubeadm_verbosity=4 \
 --auto-approve

This combination (k8s 1.12, arm, Ubuntu Bionic) fails due to the kubernetes/kubeadm/issues/413 despite having a long initialDelaySeconds. Noted in the docs to that Ubuntu Bionic not working with arm - https://github.com/stefanprodan/k8s-scw-baremetal/pull/39/files#diff-c9ac8098c5ea9d3e6a9a596ff0c512a4R14.

scaleway_server.k8s_master (remote-exec): [init] this might take a minute or longer if the control plane images have to be pulled
scaleway_server.k8s_master: Still creating... (18m50s elapsed)
scaleway_server.k8s_master: Still creating... (19m0s elapsed)
scaleway_server.k8s_master: Still creating... (19m10s elapsed)
scaleway_server.k8s_master: Still creating... (19m20s elapsed)
scaleway_server.k8s_master: Still creating... (19m30s elapsed)
scaleway_server.k8s_master: Still creating... (19m40s elapsed)
...
scaleway_server.k8s_master: Still creating... (24m30s elapsed)
scaleway_server.k8s_master: Still creating... (24m40s elapsed)
scaleway_server.k8s_master: Still creating... (24m50s elapsed)
scaleway_server.k8s_master: Still creating... (25m0s elapsed)
scaleway_server.k8s_master: Still creating... (25m10s elapsed)

arch: x86_64 k8s_version: 1.12 os: Ubuntu Bionic

terraform apply \
 -var region=par1 \
 -var arch=x86_64 \
 -var server_type=C2S \
 -var nodes=1 \
 -var server_type_node=C2S \
 -var weave_passwd=ChangeMe \
 -var docker_version=18.06 \
 -var ubuntu_version="Ubuntu Bionic" \
 -var k8s_version=stable-1.12 \
 -var kubeadm_verbosity=4 \
 --auto-approve
root@amd-master-1:~# kubectl get pods --all-namespaces
NAMESPACE     NAME                                    READY   STATUS    RESTARTS   AGE
kube-system   coredns-576cbf47c7-jvwpt                1/1     Running   0          13m
kube-system   coredns-576cbf47c7-rcg9q                1/1     Running   0          13m
kube-system   etcd-amd-master-1                       1/1     Running   0          12m
kube-system   heapster-b79f64fd5-z6mdz                1/1     Running   0          13m
kube-system   kube-apiserver-amd-master-1             1/1     Running   0          12m
kube-system   kube-controller-manager-amd-master-1    1/1     Running   0          12m
kube-system   kube-proxy-765h7                        1/1     Running   0          7m23s
kube-system   kube-proxy-r9z7r                        1/1     Running   0          13m
kube-system   kube-scheduler-amd-master-1             1/1     Running   0          12m
kube-system   kubernetes-dashboard-5656f98747-5tq9j   1/1     Running   0          41s
kube-system   metrics-server-8449859949-wr9xs         1/1     Running   0          13m
kube-system   weave-net-45m4x                         2/2     Running   1          7m23s
kube-system   weave-net-bcgvv                         2/2     Running   0          13m
root@amd-master-1:~# kubectl get nodes -o wide
NAME           STATUS   ROLES    AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION         CONTAINER-RUNTIME
amd-master-1   Ready    master   13m     v1.12.4   <private>   <none>        Ubuntu 18.04.1 LTS   4.9.93-mainline-rev1   docker://18.6.1
amd-node-1     Ready    <none>   7m30s   v1.12.4   <private>   <none>        Ubuntu 18.04.1 LTS   4.9.93-mainline-rev1   docker://18.6.1
stefanprodan commented 5 years ago

Isn't this part of #40 ? If so please close this one and rebase #40

stephenmoloney commented 5 years ago

Isn't this part of #40 ? If so please close this one and rebase #40

@stefanprodan those are separate PRs. I'm not 100% it's (#40) entirely needed - I was using it to see if the problem was with the kernel when debugging so made a PR. I put it in a separate PR for separate review.

I'd like to see this one merged though (#39) once I've finished testing it and you have reviewed it.

TLDR; I'd like to keep them separate for easier review purposes.