-
-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(podman): add usage for rootless mode on macOS
- Loading branch information
1 parent
a04aa84
commit 1e36fb9
Showing
1 changed file
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,6 @@ podman machine start | |
``` | ||
|
||
Grab connection details | ||
> note: root connection details must be used | ||
|
||
``` | ||
podman system connection ls | ||
|
@@ -126,9 +125,27 @@ Host localhost | |
IdentityFile /Users/myusername/.ssh/podman-machine-default | ||
``` | ||
|
||
Export the docker environment variables referenced above and create the cluster | ||
#### Rootless mode | ||
|
||
Delegate the `cpuset` cgroup controller to the user's systemd slice, export the docker environment variables referenced above for the non-root connection, and create the cluster: | ||
|
||
```bash | ||
podman machine ssh bash -e <<EOF | ||
printf '[Service]\nDelegate=cpuset\n' | sudo tee /etc/systemd/system/[email protected]/k3d.conf | ||
sudo systemctl daemon-reload | ||
sudo systemctl restart "user@\${UID}" | ||
EOF | ||
|
||
export DOCKER_HOST=ssh://core@localhost:53685 | ||
export DOCKER_SOCKET=/run/user/501/podman/podman.sock | ||
k3d cluster create --k3s-arg '--kubelet-arg=feature-gates=KubeletInUserNamespace=true@server:*' | ||
``` | ||
|
||
#### Rootful mode | ||
|
||
Export the docker environment variables referenced above for the root connection and create the cluster: | ||
|
||
```bash | ||
export DOCKER_HOST=ssh://root@localhost:53685 | ||
export DOCKER_SOCK=/run/podman/podman.sock | ||
k3d cluster create | ||
|