diff --git a/pkg/cluster/internal/providers/docker/provision.go b/pkg/cluster/internal/providers/docker/provision.go index 51a2e334..6c644a36 100644 --- a/pkg/cluster/internal/providers/docker/provision.go +++ b/pkg/cluster/internal/providers/docker/provision.go @@ -167,6 +167,11 @@ func commonArgs(cluster string, cfg *config.Cluster, networkName string, nodeNam // this can be enabled by default in docker daemon.json, so we explicitly // disable it, we want our entrypoint to be PID1, not docker-init / tini "--init=false", + // note: requires API v1.41+ from Dec 2020 in Docker 20.10.0 + // this is the default with cgroups v2 but not with cgroups v1, unless + // overridden in the daemon --default-cgroupns-mode + // https://github.com/docker/cli/pull/3699#issuecomment-1191675788 + "--cgroupns=private", } // enable IPv6 if necessary diff --git a/pkg/cluster/internal/providers/podman/provision.go b/pkg/cluster/internal/providers/podman/provision.go index a63cda33..c240a292 100644 --- a/pkg/cluster/internal/providers/podman/provision.go +++ b/pkg/cluster/internal/providers/podman/provision.go @@ -136,6 +136,8 @@ func commonArgs(cfg *config.Cluster, networkName string, nodeNames []string) ([] "--label", fmt.Sprintf("%s=%s", clusterLabelKey, cfg.Name), // specify container implementation to systemd "-e", "container=podman", + // this is the default in cgroupsv2 but not in v1 + "--cgroupns=private", } // enable IPv6 if necessary