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
118 changes: 94 additions & 24 deletions modules/mco-update-boot-images-configuring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
[id="mco-update-boot-images-configuring_{context}"]
= Enabling boot image management

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.
[role="_abstract"]
include::snippets/mco-update-boot-images-abstract.adoc[]

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.

Enabling the feature updates the boot image to the current {product-title} version. If the cluster is again updated to a new {product-title} version in the future, the boot image is updated again. New nodes created after enabling the feature use the updated boot image. This feature has no effect on existing nodes.
Currently, the ability to update the boot image is available for only Google Cloud Platform (GCP) and Amazon Web Services (AWS) clusters. It is not supported for clusters managed by the {cluster-capi-operator}.

.Procedure

. Edit the `MachineConfiguration` object, named `cluster`, to enable the boot image management feature for some or all of your machine sets:
. Edit the `MachineConfiguration` object, named `cluster`, to enable the updating of boot images by running the following command:
+
[source,terminal]
----
$ oc edit MachineConfiguration cluster
----

* Optional: Enable the boot image management feature for all machine sets:
* Optional: Configure the boot image update feature for all the machine sets:
+
[source,yaml]
----
Expand All @@ -32,19 +33,19 @@ metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
- resource: machinesets
apiGroup: machine.openshift.io
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:

* Optional: Enable the boot image management feature for specific machine sets:
`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: Configure the boot image update feature for specific machine sets:
+
[source,yaml]
----
Expand All @@ -54,31 +55,100 @@ metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
- resource: machinesets
apiGroup: machine.openshift.io
selection:
mode: Partial <4>
mode: Partial
partial:
machineResourceSelector:
matchLabels:
region: "east"
update-boot-image: "true"
----
<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]
====
If an appropriate label is not present on the machine set, add a key-value pair by running a command similar to following:

----
$ oc label machineset.machine ci-ln-hmy310k-72292-5f87z-worker-a region="east" -n openshift-machine-api
$ oc label machineset.machine ci-ln-hmy310k-72292-5f87z-worker-a update-boot-image=true -n openshift-machine-api
----
====

.Verification

include::snippets/mco-update-boot-images-verification.adoc[]
. View the current state of the boot image updates by viewing the machine configuration object:
+
[source,terminal]
----
$ oc get machineconfiguration cluster -n openshift-machine-api -o yaml
----
+
.Example machine set with the boot image reference
+
[source,yaml]
----
kind: MachineConfiguration
metadata:
name: cluster
# ...
status:
conditions:
- lastTransitionTime: "2024-09-09T13:51:37Z"
message: Reconciled 1 of 2 MAPI MachineSets | Reconciled 0 of 0 CAPI MachineSets
| Reconciled 0 of 0 CAPI MachineDeployments
reason: BootImageUpdateConfigurationAdded
status: "True"
type: BootImageUpdateProgressing
- lastTransitionTime: "2024-09-09T13:51:37Z"
message: 0 Degraded MAPI MachineSets | 0 Degraded CAPI MachineSets | 0 CAPI MachineDeployments
reason: BootImageUpdateConfigurationAdded
status: "False"
type: BootImageUpdateDegraded
----
+
The `status.conditions.lastTransitionTime.type:BootImageUpdateProgressing` stanza specifies the status of the boot image update. {cluster-capi-operator} machine sets and machine deployments are not currently supported for boot image updates.
+
The `status.conditions.lastTransitionTime.type:BootImageUpdateConfigurationAdded` stanza specifies if any boot image updates failed. If any of the updates fail, the Machine Config Operator is degraded. In this case, manual intervention might be required.

. Get the boot image version by running the following command:
+
[source,terminal]
----
$ oc get machinesets <machineset_name> -n openshift-machine-api -o yaml
----
+
.Example machine set with the boot image reference
+
[source,yaml]
----
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: ci-ln-77hmkpt-72292-d4pxp
update-boot-image: "true"
name: ci-ln-77hmkpt-72292-d4pxp-worker-a
namespace: openshift-machine-api
spec:
# ...
template:
# ...
spec:
# ...
providerSpec:
# ...
value:
disks:
- autoDelete: true
boot: true
image: projects/rhcos-cloud/global/images/<boot_image>
# ...
----
+
This boot image is the same as the current {product-title} version. The location and format of the boot image within the machine set differs, based on the platform. However, the boot image is always listed in the `spec.template.spec.providerSpec.` parameter.
40 changes: 22 additions & 18 deletions modules/mco-update-boot-images-disable.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: None <4>
mode: None
----
where:
+
--
<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.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:None`:: Specifies that the feature is disabled for all machine sets in the cluster.
--

////
Expand All @@ -61,24 +62,27 @@ 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

include::snippets/mco-update-boot-images-verification.adoc[]

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.32.3
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