Failed to start minikube: Error while starting minikube. Error: X Exiting due to MK_USAGE: Container runtime must be set to "containerd" for rootless

Failed to start minikube: Error while starting minikube. Error: X Exiting due to MK_USAGE: Container runtime must be set to "containerd" for rootless

我遇到了错误,我相信解决它的方法是 运行ning:minikube start --container-runtime=containerd 但扩展似乎 运行 minikube start。那么我应该如何添加标志呢? 这是 launch.json 文件

{
    "configurations": [
        {
            "name": "Cloud Run: Run/Debug Locally",
            "type": "cloudcode.cloudrun",
            "request": "launch",
            "build": {
                "docker": {
                    "path": "Dockerfile"
                }
            },
            "image": "dai",
            "service": {
                "name": "dai",
                "containerPort": 8080,
                "resources": {
                    "limits": {
                        "memory": "256Mi"
                    }
                }
            },
            "target": {
                "minikube": {}
            },
            "watch": true
        }
    ]
}

Cloud Code for VS Code 目前不支持此类设置。但是您可以配置 minikube 以应用这些设置 minikube config set.

Cloud 运行 仿真创建了一个名为 cloud-run-dev-internal 的单独 minikube 配置文件。所以你应该能够运行以下内容:

minikube config set --profile cloud-run-dev-internal container-runtime containerd

您必须删除该 minikube 配置文件才能使设置在下次启动时生效:

minikube delete --profile cloud-run-dev-internal