1 2 3 4 5 6 7 8 9
post_install() { getent group kube >/dev/null || groupadd -r kube getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin -c "Kubernetes user" kube chown -R kube:kube /var/lib/kubelet } post_upgrade() { post_install }