Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 107 additions & 41 deletions modules/mco-update-boot-images-configuring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
[id="mco-update-boot-images-configuring_{context}"]
= Enabling boot image management

[role="_abstract"]
include::snippets/mco-update-boot-images-abstract.adoc[]

By default, for {gcp-first} and {aws-first} clusters, the Machine Config Operator (MCO) updates the boot image in the machine sets in your cluster whenever you update your cluster.

If you disabled the boot image management feature, so that the boot images are not updated, you can re-enable the feature by editing the `MachineConfiguration` object.
Expand All @@ -21,30 +24,6 @@ Enabling the feature updates the boot image to the current {product-title} versi
.Prerequisites

* For {vmw-short}, enable the `TechPreviewNoUpgrade` feature set on the cluster. For more information, see "Enabling features using feature gates".
+
[NOTE]
====
Enabling the `TechPreviewNoUpgrade` feature set cannot be undone and prevents minor version updates. These feature sets are not recommended on production clusters.
====
+
Wait until the `managedBootImagesStatus` stanza displays in the `MachineConfiguration` object.
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: MachineConfiguration
metadata:
name: cluster
# ...
status:
# ...
managedBootImagesStatus:
machineManagers:
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: None
----

.Procedure

Expand All @@ -65,17 +44,18 @@ metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: All <4>
mode: All
----
<1> Configures the boot image management feature.
<2> Specifies the API group. This must be `machine.openshift.io`.
<3> Specifies the resource within the specified API group to apply the change. This must be `machinesets`.
<4> Specifies that the feature is enabled for all machine sets in the cluster.
where:

`spec.managedBootImages`:: Configures the boot image management feature.
`spec.managedBootImages.machineManagers.selection.mode`:: Specifies that all the machine sets in the cluster are to be updated.


* Optional: Enable the boot image management feature for specific machine sets:
+
Expand All @@ -87,21 +67,21 @@ metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: Partial <4>
mode: Partial
partial:
machineResourceSelector:
matchLabels:
region: "east"
----
<1> Configures the boot image update feature.
<2> Specifies the API group. This must be `machine.openshift.io`.
<3> Specifies the resource within the specified API group to apply the change. This must be `machinesets`.
<4> Specifies that the feature is enabled for machine sets with the specified label.
where:

`spec.managedBootImages`:: Configures the boot image management feature.
`spec.managedBootImages.machineManagers.selection.partial.machineResourceSelector.matchLabels`:: Specifies that any machine set with this label is to be updated.
+
[TIP]
====
Expand All @@ -114,4 +94,90 @@ $ oc label machineset.machine ci-ln-hmy310k-72292-5f87z-worker-a region="east" -

.Verification

include::snippets/mco-update-boot-images-verification.adoc[]
. View the current state of the boot image management feature by using the following command to view the machine configuration object:
+
[source,terminal]
----
$ oc get machineconfiguration cluster -o yaml
----
+
.Example machine set with the boot image reference
[source,yaml]
----
kind: MachineConfiguration
metadata:
name: cluster
# ...
status:
conditions:
- lastTransitionTime: "2025-05-01T20:11:49Z"
message: Reconciled 2 of 4 MAPI MachineSets | Reconciled 0 of 0 CAPI MachineSets
| Reconciled 0 of 0 CAPI MachineDeployments
reason: BootImageUpdateConfigurationUpdated
status: "True"
type: BootImageUpdateProgressing
- lastTransitionTime: "2025-05-01T19:30:13Z"
message: 0 Degraded MAPI MachineSets | 0 Degraded CAPI MachineSets | 0 CAPI MachineDeployments
reason: BootImageUpdateConfigurationUpdated
status: "False"
type: BootImageUpdateDegraded
managedBootImagesStatus:
machineManagers:
- apiGroup: machine.openshift.io
resource: controlplanemachinesets
selection:
mode: All
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: All
----
+
--
where:

`status.managedBootImagesStatus.machineManagers.selection.mode`:: Specifies that the boot image management feature is enabled when set to `All`.
--

. Scale a machine set to create a new node by using a command similar to the following. The boot image is updated only for new nodes.
+
[source,terminal]
----
$ oc scale --replicas=2 machinesets.machine.openshift.io <machineset> -n openshift-machine-api
----

. If your cluster was using an older boot image version, you can see the new boot image version when the new node reaches the `READY` state. View the {op-system-first} version on a nodes:

.. Log in to the node by using a command similar to the following:
+
[source,terminal]
----
$ oc debug node/<node_name>
----

.. Set `/host` as the root directory within the debug shell by using the following command:
+
[source,terminal]
----
sh-5.1# chroot /host
----

.. View the `/sysroot/.coreos-aleph-version.json` file by using a command similar to the following:
+
[source,terminal]
----
sh-5.1# cat /sysroot/.coreos-aleph-version.json
----
+
.Example output
[source,yaml]
----
{
# ...
"ref": "docker://ostree-image-signed:oci-archive:/rhcos-9.6.20251015-1-ostree.x86_64.ociarchive",
"version": "9.6.20251015-1"
}
----
where:

`<version>`:: Specifies the boot image version.
31 changes: 16 additions & 15 deletions modules/mco-update-boot-images-disable.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[id="mco-update-boot-images-disable_{context}"]
= Disabling boot image management

By default, for {gcp-first} and {aws-first} clusters, the Machine Config Operator (MCO) manages and updates the boot image in the machine sets in your cluster whenever you update your cluster. For {vmw-first}, you can enable boot image management as a Technology Preview feature.
[role="_abstract"]
You can disable the boot image management feature so that the Machine Config Operator (MCO) no longer manages or updates the boot image in the affected machine sets. For example, you could disable this feature for the worker nodes in order to use a custom boot image that you do not want changed.

You can disable the boot image management feature for your cluster by editing the `MachineConfiguration` object. When disabled, the Machine Config Operator (MCO) no longer manages the boot image in your cluster and no longer updates the boot image with each cluster update.

Expand Down Expand Up @@ -43,10 +44,8 @@ spec:
----
+
--
<1> Configures the boot image management feature.
<2> Specifies an API group. This must be `machine.openshift.io`.
<3> Specifies the resource within the specified API group to apply the change. This must be `machinesets`.
<4> Specifies that the feature is disabled for all machine sets in the cluster.
`spec.managedBootImages`:: Configures the boot image management feature.
`spec.managedBootImages.machineManagers.selection.mode.None`:: Specifies that the feature is disabled for all machine sets in the cluster.
--

////
Expand All @@ -61,22 +60,24 @@ metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: Partial <4>
mode: Partial
partial:
machineResourceSelector: <5>
machineResourceSelector:
matchLabels:
region: "east"
----
<1> Configures the boot image management feature.
<2> Specifies an API group. This must be `machine.openshift.io`.
<3> Specifies the resource within the specified API group to apply the change. This must be `machinesets`.
<4> Specifies that the feature is disabled for specific machine sets.
<5> Specifies that the feature is enabled only for machine sets with these labels. The feature is disabled for any machine set that does not contain the listed labels.
where:

`spec.managedBootImages`:: Specifies the configuration of the boot image management feature.
`spec.managedBootImages.machineManagers.apiGroup`:: Specifies an API group. This must be `machine.openshift.io`.
`spec.managedBootImages.machineManagers.resource`:: Specifies the resource within the specified API group to apply the change. This must be `machinesets`.
`spec.managedBootImages.machineManagers.selection.mode`:: Specifies that the feature is disabled for specific machine sets.
`spec.managedBootImages.machineManagers.selection.partial.machineResourceSelector`:: Specifies that the feature is enabled only for machine sets with these labels. The feature is disabled for any machine set that does not contain the listed labels.
////

.Verification
Expand Down
3 changes: 2 additions & 1 deletion modules/nodes-nodes-viewing-listing-pods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[id="nodes-nodes-viewing-listing-pods_{context}"]
= Listing pods on a node in your cluster

You can list all the pods on a specific node.
[role="_abstract"]
You can list all of the pods on a node by using the `oc get pods` command along with specific flags. This command shows the number of pods on that node, the state of the pods, number of pod restarts, and the age of the pods.

.Procedure

Expand Down
51 changes: 28 additions & 23 deletions modules/nodes-nodes-viewing-listing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[id="nodes-nodes-viewing-listing_{context}"]
= About listing all the nodes in a cluster

You can get detailed information on the nodes in the cluster.
[role="_abstract"]
You can get detailed information about the nodes in the cluster, which can help you understand the state of the nodes in your cluster.

* The following command lists all nodes:
+
Expand Down Expand Up @@ -108,39 +109,39 @@ include::snippets/osd-aws-example-only.adoc[]
.Example output
[source,text]
----
Name: node1.example.com <1>
Roles: worker <2>
Name: node1.example.com
Roles: worker
Labels: kubernetes.io/os=linux
kubernetes.io/hostname=ip-10-0-131-14
kubernetes.io/arch=amd64 <3>
kubernetes.io/arch=amd64
node-role.kubernetes.io/worker=
node.kubernetes.io/instance-type=m4.large
node.openshift.io/os_id=rhcos
node.openshift.io/os_version=4.5
region=east
topology.kubernetes.io/region=us-east-1
topology.kubernetes.io/zone=us-east-1a
Annotations: cluster.k8s.io/machine: openshift-machine-api/ahardin-worker-us-east-2a-q5dzc <4>
Annotations: cluster.k8s.io/machine: openshift-machine-api/ahardin-worker-us-east-2a-q5dzc
machineconfiguration.openshift.io/currentConfig: worker-309c228e8b3a92e2235edd544c62fea8
machineconfiguration.openshift.io/desiredConfig: worker-309c228e8b3a92e2235edd544c62fea8
machineconfiguration.openshift.io/state: Done
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Wed, 13 Feb 2019 11:05:57 -0500
Taints: <none> <5>
Taints: <none>
Unschedulable: false
Conditions: <6>
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
OutOfDisk False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasSufficientDisk kubelet has sufficient disk space available
MemoryPressure False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:05:57 -0500 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Wed, 13 Feb 2019 15:09:42 -0500 Wed, 13 Feb 2019 11:07:09 -0500 KubeletReady kubelet is posting ready status
Addresses: <7>
Addresses:
InternalIP: 10.0.140.16
InternalDNS: ip-10-0-140-16.us-east-2.compute.internal
Hostname: ip-10-0-140-16.us-east-2.compute.internal
Capacity: <8>
Capacity:
attachable-volumes-aws-ebs: 39
cpu: 2
hugepages-1Gi: 0
Expand All @@ -154,7 +155,7 @@ Allocatable:
hugepages-2Mi: 0
memory: 7558116Ki
pods: 250
System Info: <9>
System Info:
Machine ID: 63787c9534c24fde9a0cde35c13f1f66
System UUID: EC22BF97-A006-4A58-6AF8-0A38DEEA122A
Boot ID: f24ad37d-2594-46b4-8830-7f7555918325
Expand All @@ -167,7 +168,7 @@ System Info: <9>
Kube-Proxy Version: v1.33.4
PodCIDR: 10.128.4.0/24
ProviderID: aws:///us-east-2a/i-04e87b31dc6b3e171
Non-terminated Pods: (12 in total) <10>
Non-terminated Pods: (12 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits
--------- ---- ------------ ---------- --------------- -------------
openshift-cluster-node-tuning-operator tuned-hdl5q 0 (0%) 0 (0%) 0 (0%) 0 (0%)
Expand All @@ -188,7 +189,7 @@ Allocated resources:
cpu 380m (25%) 270m (18%)
memory 880Mi (11%) 250Mi (3%)
attachable-volumes-aws-ebs 0 0
Events: <11>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal NodeHasSufficientPID 6d (x5 over 6d) kubelet, m01.example.com Node m01.example.com status is now: NodeHasSufficientPID
Expand All @@ -200,17 +201,21 @@ Events: <11>
Normal Starting 6d kubelet, m01.example.com Starting kubelet.
#...
----
<1> The name of the node.
<2> The role of the node, either `master` or `worker`.
<3> The labels applied to the node.
<4> The annotations applied to the node.
<5> The taints applied to the node.
<6> The node conditions and status. The `conditions` stanza lists the `Ready`, `PIDPressure`, `MemoryPressure`, `DiskPressure` and `OutOfDisk` status. These condition are described later in this section.
<7> The IP address and hostname of the node.
<8> The pod resources and allocatable resources.
<9> Information about the node host.
<10> The pods on the node.
<11> The events reported by the node.
where:
+
--
`Names`:: Specifies the name of the node.
`Roles`:: Specifies the role of the node, either `master` or `worker`.
`Labels`:: Specifies the labels applied to the node.
`Annotations`:: Specifies the annotations applied to the node.
`Taints`:: Specifies the taints applied to the node.
`Conditions`:: Specifies the node conditions and status. The `conditions` stanza lists the `Ready`, `PIDPressure`, `MemoryPressure`, `DiskPressure` and `OutOfDisk` status. These condition are described later in this section.
`Addresses`:: Specifies the IP address and hostname of the node.
`Capacity`:: Specifies the pod resources and allocatable resources.
`Information`:: Specifies information about the node host.
`Non-terminated Pods`:: Specifies the pods on the node.
`Events`:: Specifies the events reported by the node.
--
+
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
[NOTE]
Expand Down
5 changes: 2 additions & 3 deletions modules/nodes-nodes-viewing-memory.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
[id="nodes-nodes-viewing-memory_{context}"]
= Viewing memory and CPU usage statistics on your nodes

You can display usage statistics about nodes, which provide the runtime
environments for containers. These usage statistics include CPU, memory, and
storage consumption.
[role="_abstract"]
You can display usage statistics about nodes, including CPU, memory, and storage consumption. These statistics can help you ensure your cluster is running efficiently.

.Prerequisites

Expand Down
Loading