2020년 9월 27일 일요일

How to Install Docker & Kubernetes & LXD on Odroid-HC2 (or XU4)

How to Install Docker & Kubernetes & LXD on Odroid-HC2 (or XU4)


##############################################################

Environment
  Device :  Odroid-HC2
  OS : Ubuntu-20.04

##############################################################






1. Install App

$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl gnupg-agent  software-properties-common -y

2. Install Docker

1) Odroid-HC2 (or XU4)

### Install Docker
$ sudo apt install docker docker-compose
$ sudo usermod -aG docker $USER
※ Docker’s Official Repository is not supported

### Test Docker
$ sudo docker run hello-world

2) Odroid-C1

Not Support (Kernel is old)

3) Odroid-C2

### Insert Docker’s official GPG key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
### Verify key
$ sudo apt-key fingerprint 0EBFCD88
### Insert Docker’s Repository
$ sudo add-apt-repository \
   "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
$ sudo apt update
### Install Docker
$ sudo apt install docker-ce docker-ce-cli containerd.io -y
$ sudo usermod -aG docker $USER

### Test Docker

$ sudo docker run hello-world


※ Docker’s Official Repository

○ x86_64
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
○ arm64
$ sudo add-apt-repository \
   "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
○ armhf
$ sudo add-apt-repository \
   "deb [arch=amdhf] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

3. Install Kubernetes

### Insert k8s official GPG key
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
### Insert k8s Repository
$ sudo add-apt-repository "deb https://apt.kubernetes.io/ kubernetes-xenial main"
※ currently bionic & focal is not supported
$ sydo apt update
### Install k8s
$ sudo apt install kubeadm kubelet kubectl kubernetes-cni -y

4. Install LXC & LXD

1) Odroid-HC2 (or XU4)

$ sudo apt install lxd lxd-client -y
$ sudo lxd init
$ sudo usermod -aG lxd $USER $ lxc image list images:

2) Odroid-C1 & C2

Not Support

※ x86_64

$ sudo apt install lxc lxd -y
$ sudo lxd init
$ sudo usermod -aG lxd $USER
$ lxc image list images:


How To Install Docker on Odroid-C2 (or ARM64)

How To Install Docker on Odroid-C2 (or ARM64) Environment Device : Odroid-C2 OS : Ubuntu-20.04 1. Install Dock...