chris-short / rak8s

Stand up a Raspberry Pi based Kubernetes cluster with Ansible
MIT License
365 stars 112 forks source link

Kubelet install failure and deprecation warning fix #58

Closed PostlMC closed 5 years ago

PostlMC commented 5 years ago

Updates to roles/kubeadm/tasks/main.yml to resolve an error installing kubelet and a deprecation warning about Ansible apt usage.

Description

1) Deprecation warning "Invoking 'apt' only once while using a loop via squash_actions is deprecated" was coming up based on used of with_items in apt loop in the "Install k8s ... Y'all" task. Fix was to place array of packages in pkg and drop with_items. 2) "No package matching 'kubelet' is available" error encountered in same task. Fix was to add update_cache: yes to apt operation so new apt sources added in previous task get picked up.

Reordering of some elements in the "Install k8s ... Y'all" task was just me being pedantic. ;)

Testing

First test was to resume previously failed partial install. Subsequent test was to wipe all SD cards on my four node cluster and run a clean install. Both succeeded.

Issue Number

kubelet installation failure is called out in issue 57 (though, it's not the primary focus of that issue.)