Hi,
We love microk8s but we have to use it in an offline setting. We have tried the offline snap install but it still reaches out to the network for microk8s and hence does not get installed.
We tried just copying the binaries installed by snap but that didn't work either as they depend on snap.
Are there any directions on how to create the microk8s binaries and start and stop them without any snap dependency?
I've never installed snaps on air gapped settings. I guess you tried this one
https://forum.snapcraft.io/t/offline-snap-installers-and-possibility-to-update/275/2
@balchua thanks for your reply. Yes, I tried that and it will still try to access the internet :(
Which os are you using? Centos? Perhaps you also need to download and install core or core18 before installing microk8s snap.
I'm using ubuntu 18.04. I tried that too :( (core or core18).
Can you paste the logs here?
@RAbraham you will probably need to download the core snap.
snap download core --channel=stable
snap download microk8s --channel=stable
rm *.assert
For charmed kubernetes we have the script at [1] that handles among others the snap installation in air gaped installations.
[1] https://github.com/charmed-kubernetes/cdk-shrinkwrap/blob/master/shrinkwrap.py
I'm very sorry @balchua . I think I did something different. https://askubuntu.com/questions/1209847/18-04-cant-install-docker-in-offline-mode-using-snap
Let me try out @ktsakalozos's solution and come back. Thank you so much both of you :).
@ktsakalozos I tried this.
ubuntu@microk8s:~$ mkdir snap_download
ubuntu@microk8s:~$ cd snap_download/
ubuntu@microk8s:~/snap_download$ snap download core --channel=stable
Fetching snap "core"
Fetching assertions for "core"
Install the snap with:
snap ack core_8689.assert
snap install core_8689.snap
ubuntu@microk8s:~/snap_download$ ls
core_8689.assert core_8689.snap
ubuntu@microk8s:~/snap_download$ snap download microk8s --channel=stable
Fetching snap "microk8s"
Fetching assertions for "microk8s"
Install the snap with:
snap ack microk8s_1214.assert
snap install microk8s_1214.snap
ubuntu@microk8s:~/snap_download$ ls
core_8689.assert core_8689.snap microk8s_1214.assert microk8s_1214.snap
ubuntu@microk8s:~/snap_download$ rm ./*.assert
ubuntu@microk8s:~/snap_download$ ls
core_8689.snap microk8s_1214.snap
# Turn of Wifi
ubuntu@microk8s:~/snap_download$ sudo snap install core_8689.snap
error: cannot find signatures with metadata for snap "core_8689.snap"
This worked.
ubuntu@microk8s:~/snap_download$ sudo snap ack core_8689.assert
ubuntu@microk8s:~/snap_download$ sudo snap install core_8689.snap
2020-03-03T12:21:59-05:00 INFO Waiting for restart...
core 16-2.43.3 from Canonical✓ installed
ubuntu@microk8s:~/snap_download$ sudo snap ack microk8s_1214.assert
ubuntu@microk8s:~/snap_download$ sudo snap install microk8s_1214.snap --classic
microk8s v1.17.3 from Canonical✓ installed
Thank you @balchua and @ktsakalozos for your guidance!
Is there a way to install microk8s without using snap at all?
I wanted to install microk8s in WSL2, there's a lengthy blog that explains how to do that but after several tries and errors I gave up. So I was wondering if there is some easier way to this on WSL2.
Is there a way to install microk8s without using snap at all?
I am sorry there is no way to install MicroK8s without snapd.
Most helpful comment
I've never installed snaps on air gapped settings. I guess you tried this one
https://forum.snapcraft.io/t/offline-snap-installers-and-possibility-to-update/275/2