Skip to content

Instantly share code, notes, and snippets.

@mrballcb
Last active April 6, 2023 08:46
Show Gist options
  • Save mrballcb/ce348e5aab7364bc953c618b8a5a2e9e to your computer and use it in GitHub Desktop.
Save mrballcb/ce348e5aab7364bc953c618b8a5a2e9e to your computer and use it in GitHub Desktop.
Configure Rancher Desktop 1.0.0 to use a custom bridge IP on Mac
# This will survive restarts of Rancher Desktop. I don't expect it to survive "Reset Kubernetes" actions.
# This will get a shell inside the running VM.
# Many thanks to Jan Dubois, this one liner replaced a complicated set of commands I had here earlier.
LIMA_HOME="$HOME/Library/Application Support/rancher-desktop/lima" limactl shell 0
sudo su -
vi /etc/conf.d/docker
# Add to the DOCKER_OPTS cli the bip and subnet you want. I picked a very small /24 at the end of the 172.16/20 space:
DOCKER_OPTS="--bip 172.31.255.1/24"
# Save the file and exit
service docker restart
exit; exit
rm user.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment