0

我正在尝试连接到 Hyperkit 以检查在此 VM 上运行的容器。

我现在得到的只是[screen is terminating]

这是我所做的:

MacBook-Pro-Karol:  ~
→ minikube start --driver=hyperkit
  minikube v1.12.3 na Darwin 10.15.6
✨  Using the hyperkit driver based on user configuration
  Starting control plane node minikube in cluster minikube
  Creating hyperkit VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
  preparing Kubernetes v1.18.3 on Docker 19.03.12...
  Verifying Kubernetes components...
  Enabled addons: default-storageclass, storage-provisioner
  Ready! kubectl is configured to be used with "minikube".

MacBook-Pro-Karol:  ~
→ sudo screen /Users/karol/.minikube/machines/minikube/tty
Password:
[screen is terminating]

MacBook-Pro-Karol:  ~
→ screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
[screen is terminating]

Cannot exec '/Users/karol/Library/Containers/com.docker.docker/Data/vms/0/tty': Permission denied

→ sudo screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
Password:
[screen is terminating]

Cannot exec '/Users/karol/Library/Containers/com.docker.docker/Data/vms/0/tty': Operation not permitted

任何帮助,将不胜感激。

4

1 回答 1

3

您可以使用登录minikube ssh到运行 minikube 的 VM:

使用 SSH 登录或在机器上运行命令;类似于 'docker-machine ssh'。

minikube ssh [flags]

然后用于docker ps检查此 VM 内正在运行的容器:

$ docker ps  | grep kube-api
f53aebd26287        7e28efa976bd              "kube-apiserver --ad…"   16 minutes ago   k8s_kube-apiserver_kube-apiserver-minikube_kube-system_8009646ba816631d0677c2668886baad_1
12188a523d12        k8s.gcr.io/pause:3.2      "/pause"                 16 minutes ago   k8s_POD_kube-apiserver-minikube_kube-system_8009646ba816631d0677c2668886baad_1
于 2020-08-28T07:59:41.380 回答