kubernetes - Kubernetes 构建集群时出错,找不到实用程序子网
问题描述
为什么当我尝试更新新的 Kubernetes 集群时会出现以下错误:
$ kops update cluster --name k8s-web-dev
error building tasks: could not find utility subnet in zone: "us-east-1b"
我还不能将它部署到 aws 中。它只在 s3 中创建配置。
另外因为我有私有子网和公共子网,所以我手动更新 k8s 配置以指向正确的子网 ID。例如:ID 是手动添加的。
subnets:
- cidr: 10.0.0.0/19
id: subnet-3724bb40
name: us-east-1b
type: Private
zone: us-east-1b
- cidr: 10.0.64.0/19
id: subnet-918a35c8
name: us-east-1c
type: Private
zone: us-east-1c
- cidr: 10.0.32.0/20
id: subnet-4824bb3f
name: utility-us-east-1b
type: Public
zone: us-east-1b
- cidr: 10.0.96.0/20
id: subnet-908a35c9
name: utility-us-east-1c
type: Public
zone: us-east-1c
同样有趣的是,我没有改变我的配置。但是当我一次又一次地运行 kops update 时,我得到了两个不同的结果。这怎么可能?
kops update cluster --name $n
error building tasks: could not find utility subnet in zone: "us-east-1c"
然后这个
kops update cluster --name $n
error building tasks: could not find utility subnet in zone: "us-east-1b"
解决方案
在命令行选项中使用--bastion
参数kops
假定堡垒实例组已经就位。要创建堡垒实例组,您可以使用--role
标志:
kops create instancegroup bastions --role Bastion --subnet $SUBNET
检查此链接以获取更多信息。
推荐阅读
- android - 在图像上添加 GPS EXIF 在 React-Native iOS 中不起作用
- python - 如何提高 HDF5 读取数据的性能?
- angularjs - 属性“分页器”没有初始值设定项,也没有在构造函数中明确分配
- webrtc - 广播到多个对等点
- sql - 如何将 SQL 转换为数据框
- r - 是否可以在 Shiny 中将 eventReactive 用于超过 1 个 checkboxInput?
- jpa - 多个与/或时的JPA查询方法逻辑
- python - 如何用非对称误差线拟合数据
- python - 如何增加神经网络中的层数?
- python - 找到到给定点的最小欧几里得距离