In this procedure, we'll walkthrough the installation of MicroShift
on an Jetson Xavier server. This procedure holds all the prerequisites and instructions in order to get your MicroShift
server up and running.
Before you start, make sure that you have the following prereqs met:
- Jetson Xavier (Should be connected to some network)
- Ubuntu 18.04 (L4T, AKA Linux For Tegra, Should come with the Jetson itself by default)
Install all the needed dependencies using the apt-get install
command. (If you have any problems with the installation of one of those packages, you can use the apt-get install --fix-broken
command:
$ apt install -y curl jq runc iptables conntrack nvidia-container-runtime nvidia-container-toolkit
$ curl https://raw.githubusercontent.com/cri-o/cri-o/main/scripts/get | bash
Use the following guidance in order to configure some CRI-O level values:
$ rm /etc/crio/crio.conf.d/*
$ cat << EOF > /etc/cni/net.d/100-crio-bridge.conf
{
"cniVersion": "0.4.0",
"name": "crio",
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"hairpinMode": true,
"ipam": {
"type": "host-local",
"routes": [
{ "dst": "0.0.0.0/0" }
],
"ranges": [
[{ "subnet": "10.42.0.0/24" }]
]
}
}
EOF
$ export ARCH=arm64
$ export VERSION=4.8.0-0.microshift-2022-04-20-182108
$ curl -LO https://github.com/redhat-et/microshift/releases/download/$VERSION/microshift-linux-${ARCH}
$ mv microshift-linux-${ARCH} /usr/local/bin/microshift; chmod 755 /usr/local/bin/microshift
Create a systemd
service that will allow you to use execute systemctl
command on your MicroShift
server:
cat << EOF > /usr/lib/systemd/system/microshift.service
[Unit]
Description=MicroShift
After=crio.service
[Service]
WorkingDirectory=/usr/local/bin/
ExecStart=/usr/local/bin/microshift run
Restart=always
User=root
[Install]
WantedBy=multi-user.target
EOF
$ systemctl enable crio --now
$ systemctl enable microshift.service --now
$ export ARCH=arm64
$ curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${ARCH}/kubectl"
$ chmod +x ./kubectl
$ mv ./kubectl /usr/local/bin/kubectl
Use the created kubeconfig
file in order to start interacting with the MicroShift
API:
$ export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig
Once microshift is up, these pods should be up:
$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system kube-flannel-ds-rc85f 1/1 Running 1 3d1h
kubevirt-hostpath-provisioner kubevirt-hostpath-provisioner-bnrz2 1/1 Running 0 3d1h
openshift-dns dns-default-p2cc5 2/2 Running 0 3d1h
openshift-dns node-resolver-wd7mx 1/1 Running 1 3d1h
openshift-ingress router-default-85bcfdd948-4nx7k 1/1 Running 0 3d1h
openshift-service-ca service-ca-76674bfb58-fbp4p 1/1 Running 0 3d1h