mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
70 lines
2.5 KiB
Plaintext
70 lines
2.5 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * installing/installing-special-config.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="installation-special-config-kargs_{context}"]
|
|
|
|
= Adding day-1 kernel arguments
|
|
|
|
Although it is often preferable to modify kernel arguments as a day-2 activity,
|
|
you might want to add kernel arguments to all master or worker nodes during initial cluster
|
|
installation. Here are some reasons you might want
|
|
to add kernel arguments during cluster installation so they take effect before
|
|
the systems first boot up:
|
|
|
|
* You need to do some low-level network configuration before the systems start.
|
|
|
|
* You want to disable a feature, such as SELinux, so it has no impact on the systems when they first come up.
|
|
+
|
|
[WARNING]
|
|
====
|
|
Disabling SELinux on {op-system} in production is not supported.
|
|
Once SELinux has been disabled on a node, it must be re-provisioned before re-inclusion in a production cluster.
|
|
====
|
|
|
|
To add kernel arguments to master or worker nodes, you can create a `MachineConfig` object
|
|
and inject that object into the set of manifest files used by Ignition during
|
|
cluster setup.
|
|
|
|
For a listing of arguments you can pass to a RHEL 8 kernel at boot time, see
|
|
link:https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt[Kernel.org kernel parameters].
|
|
It is best to only add kernel arguments with this procedure if they are needed to complete the initial
|
|
{product-title} installation.
|
|
|
|
.Procedure
|
|
|
|
. Change to the directory that contains the installation program and generate the Kubernetes manifests for the cluster:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ ./openshift-install create manifests --dir <installation_directory>
|
|
----
|
|
|
|
. Decide if you want to add kernel arguments to worker or control plane nodes.
|
|
|
|
. In the `openshift` directory, create a file (for example,
|
|
`99-openshift-machineconfig-master-kargs.yaml`) to define a `MachineConfig`
|
|
object to add the kernel settings.
|
|
This example adds a `loglevel=7` kernel argument to control plane nodes:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ cat << EOF > 99-openshift-machineconfig-master-kargs.yaml
|
|
apiVersion: machineconfiguration.openshift.io/v1
|
|
kind: MachineConfig
|
|
metadata:
|
|
labels:
|
|
machineconfiguration.openshift.io/role: master
|
|
name: 99-openshift-machineconfig-master-kargs
|
|
spec:
|
|
kernelArguments:
|
|
- loglevel=7
|
|
EOF
|
|
----
|
|
+
|
|
You can change `master` to `worker` to add kernel arguments to worker nodes instead.
|
|
Create a separate YAML file to add to both master and worker nodes.
|
|
|
|
You can now continue on to create the cluster.
|