我继续参考以下站点进行工作\n(我不使用 EKS。我使用 kops 在 ec2 上创建 k8s)
\n\n当我尝试打电话时,kubectl get service
我收到消息:error: You must be logged in to the server (Unauthorized)
这是我所做的:
\n设置IAM用户(创建用户并添加角色)
\n集群状态存储(S3)
\n准备本地环境
\nexport NAME=myfirstcluster.example.com \nexport KOPS_STATE_STORE=s3://prefix-example-com-state-store\n
Run Code Online (Sandbox Code Playgroud)\n创建集群配置kops create cluster--zones=us-west-2a${NAME}
构建集群kops update cluster ${NAME} --yes
\xe2\x98\x85成功\xe2\x98\x85
\nkubectl get nodes
,我不断收到错误:You must be logged in to the server (Unauthorized) …
我无法删除虚拟机。以下是机器类型:
f1-micro (1 vCPU, 0.6 GB memory)
Run Code Online (Sandbox Code Playgroud)
注意:- 删除按钮对我来说被禁用。因此我无法删除它。
以下是我从 cloud shell 收到的错误:
ERROR: (gcloud.compute.instances.delete) Could not fetch resource:
- Invalid resource usage: 'Resource cannot be deleted if it's protected against deletion.'.
Run Code Online (Sandbox Code Playgroud)
请帮助我解决这个问题。