summarylogtreecommitdiffstats
path: root/kubernetes.install
blob: 01cb2b52252f4de886daf693e85022ae9ae681eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}

post_remove() {
    getent passwd kube >/dev/null && userdel kube
    getent group kube >/dev/null && groupdel kube
}