如何在 Openshift 集群安装期间定义 "externalIP" 范围?
How to define "externalIP" range during Openshift cluster installation?
我正在寻找在 Openshift 集群安装期间定义 externalIP 范围的方法(通过 install-config.yaml 中的声明)。
4.3 及更高版本的 Openshift 文档 (linky) 没有为此提供任何字段。
3.5 ( linky ) 中的旧定义 ( externalIPNetworkCIDR ) 似乎不起作用。
根据 RH“我们无法在集群安装期间指定外部 IP 参数,应该完成 post-安装。”
实际上你可以:
首先创建 openshift 安装清单
./openshift-install create manifests --dir=<installation_directory>
检查输出:
ls <installation_directory>/manifests/cluster-network-*
cluster-network-01-crd.yml
cluster-network-02-config.yml
cluster-network-03-config.yml
编辑此文件 cluster-network-03-config.yml:
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
spec:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
externalIP:
autoAssignCIDRs:
- 10.0.0.0/16
policy:
allowedCIDRs:
- 10.0.0.0/16
serviceNetwork:
- 172.30.0.0/16
defaultNetwork:
type: OpenShiftSDN
openshiftSDNConfig:
mode: NetworkPolicy
mtu: 1450
vxlanPort: 4789
继续安装路径:
./openshift-install create ignition-configs --dir=<installation_directory>
可能要注意,这是您可以在集群安装时基本配置所有内容的方式:)
in install-config.yaml 直接是不可能的,几个月前我提出了一个 github 问题,但没有获得任何意见:
https://github.com/openshift/installer/issues/4275
我正在寻找在 Openshift 集群安装期间定义 externalIP 范围的方法(通过 install-config.yaml 中的声明)。
4.3 及更高版本的 Openshift 文档 (linky) 没有为此提供任何字段。
3.5 ( linky ) 中的旧定义 ( externalIPNetworkCIDR ) 似乎不起作用。
根据 RH“我们无法在集群安装期间指定外部 IP 参数,应该完成 post-安装。”
实际上你可以:
首先创建 openshift 安装清单
./openshift-install create manifests --dir=<installation_directory>
检查输出:
ls <installation_directory>/manifests/cluster-network-*
cluster-network-01-crd.yml
cluster-network-02-config.yml
cluster-network-03-config.yml
编辑此文件 cluster-network-03-config.yml:
apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
spec:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
externalIP:
autoAssignCIDRs:
- 10.0.0.0/16
policy:
allowedCIDRs:
- 10.0.0.0/16
serviceNetwork:
- 172.30.0.0/16
defaultNetwork:
type: OpenShiftSDN
openshiftSDNConfig:
mode: NetworkPolicy
mtu: 1450
vxlanPort: 4789
继续安装路径:
./openshift-install create ignition-configs --dir=<installation_directory>
可能要注意,这是您可以在集群安装时基本配置所有内容的方式:)
in install-config.yaml 直接是不可能的,几个月前我提出了一个 github 问题,但没有获得任何意见: https://github.com/openshift/installer/issues/4275