重启本地由 Kind 驱动的 Kubernetes 集群
通过 Podman Desktop,您可以重启本地由 Kind 驱动的 Kubernetes 集群。
步骤
执行以下步骤之一
- 使用 Settings 页面重启
- 打开 Settings > Resources。
- 找到要重启的 Kind 集群。
- 点击 Restart 图标。
- 使用 Containers 页面重启
- 从左侧导航窗格打开 Containers。
- 点击 Kind 集群容器对应的 溢出菜单 图标,并选择 Restart Container。
验证
- 从左侧导航窗格打开 Containers。
- 找到已重启的 Kind 集群。集群的 Age(运行时长)与重启时间一致。
- 从左侧导航窗格打开 Pods。
- 找到在您的 Kind 集群上运行的 Pod。
权宜之计
Kind 没有重启集群的命令。因此,Podman Desktop 会停止 Kind 集群,然后再次启动它,并期望一切顺利。Kind 集群可能无法成功重启。在这种情况下:
- 考虑将 Kind 替换为一个可以重启的本地 Kubernetes 集群,例如 OpenShift Local。
- 考虑删除您的 Kind 集群,然后创建一个 Kind 集群。