99678c46e0
Add microk8s support to the ensure-kubernetes role. This installs via a snap, and is currently only implemented for Ubuntu Jammy. Mostly this is a straight-forward installation. I did notice though it needs a little more time to be stable in the test, so the timeout is bumped slightly. microk8s is the Ubuntu "blessed" way of doing things. This should be a better choice for Ubuntu platforms, because minikube is tightly tied to cri-o, which is only packaged through kubic, which is currently in some sort of deprecated but best-effort supported mode [1]. This was inspired by an outage where the kubic gpg expired. This appears fixed now. [1] https://kubic.opensuse.org/blog/2022-06-10-kubic-retired/ Change-Id: Id3e31c70a35dde218e35e7c50964f8a3c0348150
29 lines
787 B
YAML
29 lines
787 B
YAML
- name: Install microk8s
|
|
when: ensure_kubernetes_type == 'microk8s'
|
|
include_tasks: microk8s.yaml
|
|
|
|
- name: Install minikube
|
|
when: ensure_kubernetes_type == 'minikube'
|
|
block:
|
|
- name: Add all repositories
|
|
include_role:
|
|
name: ensure-package-repositories
|
|
vars:
|
|
repositories_keys:
|
|
- url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
|
|
repositories_list:
|
|
- repo: deb http://apt.kubernetes.io/ kubernetes-xenial main
|
|
|
|
- name: Install kubernetes packages and dependencies
|
|
become: yes
|
|
apt:
|
|
name:
|
|
- conntrack
|
|
- kubectl
|
|
- liblz4-tool
|
|
update_cache: yes
|
|
|
|
- name: Run cluster tasks
|
|
include_tasks: minikube.yaml
|
|
when: install_kubernetes_with_cluster
|