16.9. 生成清单文件
使用安装程序在 asset 目录中生成一组清单文件。需要清单文件来指定用于 worker 机器的 AWS Outposts 子网,并指定网络供应商所需的设置。
如果您计划重复使用 install-config.yaml
文件,请在生成清单文件前创建一个备份文件。
流程
可选:创建
install-config.yaml
文件的备份副本:$ cp install-config.yaml install-config.yaml.backup
在资产目录中生成一组清单:
$ openshift-install create manifests --dir <installation_-_directory>
此命令显示以下消息:
输出示例
INFO Consuming Install Config from target directory INFO Manifests created in: <installation_directory>/manifests and <installation_directory>/openshift
该命令生成以下清单文件:
输出示例
$ tree . ├── manifests │ ├── cluster-config.yaml │ ├── cluster-dns-02-config.yml │ ├── cluster-infrastructure-02-config.yml │ ├── cluster-ingress-02-config.yml │ ├── cluster-network-01-crd.yml │ ├── cluster-network-02-config.yml │ ├── cluster-proxy-01-config.yaml │ ├── cluster-scheduler-02-config.yml │ ├── cvo-overrides.yaml │ ├── kube-cloud-config.yaml │ ├── kube-system-configmap-root-ca.yaml │ ├── machine-config-server-tls-secret.yaml │ └── openshift-config-secret-pull-secret.yaml └── openshift ├── 99_cloud-creds-secret.yaml ├── 99_kubeadmin-password-secret.yaml ├── 99_openshift-cluster-api_master-machines-0.yaml ├── 99_openshift-cluster-api_master-machines-1.yaml ├── 99_openshift-cluster-api_master-machines-2.yaml ├── 99_openshift-cluster-api_master-user-data-secret.yaml ├── 99_openshift-cluster-api_worker-machineset-0.yaml ├── 99_openshift-cluster-api_worker-user-data-secret.yaml ├── 99_openshift-machineconfig_99-master-ssh.yaml ├── 99_openshift-machineconfig_99-worker-ssh.yaml ├── 99_role-cloud-creds-secret-reader.yaml └── openshift-install-manifests.yaml
16.9.1. 修改清单文件
AWS Outposts 环境有以下限制,需要在清单文件中手动修改:
- 网络连接的最大传输单元 (MTU) 是可通过连接传递的最大允许的数据包的大小(以字节为单位)。Outpost 服务链接支持最大数据包大小为 1300 字节。有关服务链接的更多信息,请参阅 Outpost 连接 AWS 区域
您将找到有关如何更改这些值的更多信息。
将 Outpost 子网用于 worker
machineset
修改以下文件: <installation_directory>/openshift/99_openshift-cluster-api_worker-machineset-0.yaml。找到子网 ID,并将其替换为 Outpost 中创建的专用子网的 ID。因此,所有 worker 机器将在 Outpost 中创建。
为网络提供程序指定 MTU 值
Outpost 服务链接支持最大数据包大小为 1300 字节。需要修改网络提供程序的 MTU 以符合此要求。在 manifests 目录下创建一个名为 cluster-network-03-config.yml 的新文件
如果使用 OpenShift SDN 网络供应商,请将 MTU 值设置为 1250
apiVersion: operator.openshift.io/v1 kind: Network metadata: name: cluster spec: defaultNetwork: openshiftSDNConfig: mtu: 1250
如果使用 OVN-Kubernetes 网络供应商,请将 MTU 值设置为 1200
apiVersion: operator.openshift.io/v1 kind: Network metadata: name: cluster spec: defaultNetwork: ovnKubernetesConfig: mtu: 1200