apiVersion: v1
baseDomain: example.com
compute:
- name: worker
platform: {}
replicas: 0
# ...
在部署集群之前,通过在 install-config.yaml
文件中将工作节点数设置为 0
来配置三节点集群。将工作节点数设置为 0
可确保控制平面机器是可调度的。这允许将应用程序工作负载调度到从控制平面节点运行。
由于应用程序工作负载从控制平面节点运行,因此需要额外的订阅,因为控制平面节点被视为计算节点。 |
您拥有现有的 install-config.yaml
文件。
在您的 install-config.yaml
文件中将计算副本数设置为 0
,如下面的 compute
部分所示
install-config.yaml
文件apiVersion: v1
baseDomain: example.com
compute:
- name: worker
platform: {}
replicas: 0
# ...
如果您正在部署具有用户配置的基础设施的集群
创建 Kubernetes 清单文件后,请确保在 cluster-scheduler-02-config.yml
文件中将 spec.mastersSchedulable
参数设置为 true
。您可以从 <安装目录>/manifests
中找到此文件。更多信息,请参见“使用 ARM 模板在 Azure 上安装集群”中的“创建 Kubernetes 清单文件和 Ignition 配置文件”。
请勿创建额外的 worker 节点。
cluster-scheduler-02-config.yml
文件示例apiVersion: config.openshift.io/v1
kind: Scheduler
metadata:
creationTimestamp: null
name: cluster
spec:
mastersSchedulable: true
policy:
name: ""
status: {}