Running the PoC on microk8s + MacOS (M1, arm64) #6
CunliangGeng
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some background
- WSL (Linux kernel)
- or Hyper-V to create Linux VM
Using Hyper-V can enable support for Windows-based containers.
So note that k8s of microk8s runs in a VM on MacOS and Windows.
Multiarch images
The multiarch (amd64, arm64, arm) images are available on dockerhub:
clgeng/dummy_v6_node
clgeng/v6_average_algorithm
Some changes to run PoC on MacOS (Arm64) using microk8s
microk8s-vm
VM after microk8s startsmicrok8s-vm
) and then do all operations in the VM.microk8s-vm
). Running v6 server directly on MacOS will make v6 node failed to connect due to network issue.The IP address for v6 server can be set to the IP of the VM. The VM IP can be found using
multipass ls
command on Mac or displayed when login to the VM:$HOME/.kube/config
is not found in the VM (neither in Mac). You need to create one.node_config.yaml
andnode_pod_config.yaml
to use VM's paths.node_config.yaml
node_pod_config.yaml
PORT
value is the same as the port number for v6 server set inserver_config.yaml
.Microk8s problem on MacOS
If your Mac restarts when microk8s is running, microk8s will still be running after your Mac is on. However, microk8s will not be started any more if it's stopped. And you cannot create new VMs using multipass. The restarted or new VMs will get a
unknown
state.How to solve this problem?
multipass stop --all
sudo rm /var/db/dhcpd_leases
sudo touch /var/db/dhcpd_leases
If this method does not work for you, check https://multipass.run/docs/troubleshoot-networking#heading--issues-caused-by-macos-update.
How to avoid this problem?
Quite simple: suspend or stop all multipass VMs before shutdowning or restarting your Mac.
Beta Was this translation helpful? Give feedback.
All reactions