-
-
Save mcastelino/552c99455b1d44a5e0bd4a26ddbe8ec3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install latest k8s packages | |
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial-unstable main | |
EOF | |
# Install ocid | |
apt-get install libseccomp2 libseccomp-dev seccomp libdevmapper-dev libdevmapper1.02.1 libgpgme11 libgpgme11-dev libglib2.0-dev | |
# Install ocid systemd service file | |
sh -c 'echo "[Unit] | |
Description=OCI-based implementation of Kubernetes Container Runtime Interface | |
Documentation=https://github.com/kubernetes-incubator/cri-o | |
[Service] | |
ExecStart=/usr/bin/ocid --debug | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target" > /etc/systemd/system/ocid.service' | |
systemctl daemon-reload | |
systemctl enable ocid | |
systemctl start ocid | |
mkdir /etc/ocid | |
mkdir /etc/containers | |
ocid config > /etc/ocid/ocid.conf (Change runc and conmon paths) | |
cp seccomp.json /etc/ocid/ | |
cp data/policy.json /etc/containers/ | |
cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf | |
[Service] | |
Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true" | |
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true" | |
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" | |
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local" | |
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt" | |
Environment="KUBELET_EXTRA_ARGS=--enable-cri --container-runtime=remote --container-runtime-endpoint=/var/run/ocid.sock" | |
ExecStart= | |
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_EXTRA_ARGS | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment