尽管删除了AWS上的所有内容,但无法使用kops删除Kubernetes集群

问题描述 投票:0回答:2

在过去的两个小时里,即使我删除了唯一的 EC2 实例以及我的 S3 存储桶,我也无法使用 kops 删除集群。

当我输入时:

kubectl config get-contexts

我得到:

CURRENT   NAME                   CLUSTER                AUTHINFO               NAMESPACE
*         kubecourse.k8s.local   kubecourse.k8s.local   kubecourse.k8s.local

接下来我输入:

kops delete cluster --yes

但是得到:

Error: --name is required
Usage:
  kops delete cluster [CLUSTER] [flags]

然后我输入:

kops delete cluster --name=kubecourse.k8s.local --yes

但是得到:

kops delete cluster --name=kubecourse.k8s.local
Error: State Store: Required value: Please set the --state flag or export KOPS_STATE_STORE.
For example, a valid value follows the format s3://<bucket>.

所以我输入:

 kops delete cluster --state=s3://k8-course-london

但是这次得到:

Error: --name is required
Usage:
  kops delete cluster [CLUSTER] [flags]

我陷入了一个循环。我们将非常感谢您的帮助。

kubernetes cluster-computing shutdown
2个回答
0
投票

看起来使用的语法是错误的..

正确的语法-- kops 删除集群 --name=k8s.cluster.site --yes

https://kops.sigs.k8s.io/cli/kops_delete_cluster/


0
投票

确切命令:

kops 删除集群 <> --state <> --yes

© www.soinside.com 2019 - 2024. All rights reserved.