1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/configuring-node-pools-for-hcp.adoc

75 lines
1.8 KiB
Plaintext

// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-machine-config.adoc
:_mod-docs-content-type: PROCEDURE
[id="configuring-node-pools-for-hcp_{context}"]
= Configuring node pools for {hcp}
On {hcp}, you can configure node pools by creating a `MachineConfig` object inside of a config map in the management cluster.
//.Prerequisites
//Are any prerequisites needed for this procedure? i.e., does the customer need to perform an update first?
.Procedure
. To create a `MachineConfig` object inside of a config map in the management cluster, enter the following information:
+
[source,yaml]
----
apiVersion: v1
kind: ConfigMap
metadata:
name: <configmap_name>
namespace: clusters
data:
config: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: <machineconfig_name>
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- contents:
source: data:...
mode: 420
overwrite: true
path: ${PATH} <1>
----
<1> Sets the path on the node where the `MachineConfig` object is stored.
. After you add the object to the config map, you can apply the config map to the node pool as follows:
+
[source,yaml]
----
$ oc edit nodepool <nodepool_name> --namespace <hosted_cluster_namespace>
----
+
[source,yaml]
----
apiVersion: hypershift.openshift.io/v1alpha1
kind: NodePool
metadata:
# ...
name: nodepool-1
namespace: clusters
# ...
spec:
config:
- name: <configmap_name> <1>
# ...
----
<1> Replace `<configmap_name>` with the name of your config map.
//.Verification
// Does the user need to do anything to verify that the procedure was successful?