Skip to content

Instantly share code, notes, and snippets.

@jlebon
Last active June 5, 2025 18:53
Show Gist options
  • Save jlebon/fc1fb83dbdec802c070677d9b85613fc to your computer and use it in GitHub Desktop.
Save jlebon/fc1fb83dbdec802c070677d9b85613fc to your computer and use it in GitHub Desktop.
One-shot asking Goose (w/ Gemini Pro) about the MCO using OpenShift docs
( O)> using the docs in this repo, what is the machine config operator?
I'll start by searching the documentation for "Machine Config Operator" to understand what it is.
─── shell | developer ──────────────────────────
command: rg "Machine Config Operator" -l



Okay, many files. I'll check `modules/understanding-machine-config-operator.adoc` and `modules/machine-config-operator.adoc` first, starting with the former.
─── text_editor | developer ──────────────────────────
path: modules/understanding-machine-config-operator.adoc
command: view



I need to use absolute paths. I'll try again.
─── text_editor | developer ──────────────────────────
path: ~/C/g/o/o/modules/understanding-machine-config-operator.adoc
command: view



Based on the documentation, here's a summary of the Machine Config Operator (MCO):

The Machine Config Operator in OpenShift is a core component responsible for managing the configuration and updates of the operating system ({op-system-first}) and the cluster itself. It ensures that the nodes in the cluster are consistently configured and updated in a controlled manner.

Key Components:

  • machine-config-controller: This is the central controller that runs on the control plane. It oversees all the nodes in the cluster and coordinates their configuration updates.
  • machine-config-daemon: This daemon runs on every node in the cluster. Its job is to apply the configuration changes delivered by the machine-config-controller. When a change is detected, the daemon will drain the pods from the node, apply the update, and then reboot the node.
  • machine-config-server: This component provides the initial Ignition configuration files to new nodes when they join the cluster.

How it Works:

  1. Configuration Changes: When an administrator wants to change the configuration of a node, they create or modify a KubeletConfig custom resource (CR).
  2. Orchestration: The machine-config-controller detects the change and orchestrates the rollout across the relevant nodes.
  3. Node Updates: The machine-config-daemon on each node receives the new configuration. It then takes the following steps:
    • Drains the pods from the node.
    • Applies the operating system updates and configuration changes.
    • Reboots the node.
  4. Automatic Reboots: A crucial aspect of the MCO is that it automatically reboots nodes after a configuration change to ensure the changes are applied correctly. This can be temporarily disabled by pausing the machine config pool.
  5. Configuration Drift Detection: The MCO continuously monitors the nodes to ensure their configuration matches the desired state. If a discrepancy is found (a state known as "configuration drift"), the node is marked as degraded. A degraded node is still functional but cannot be updated until the drift is corrected.

In essence, the Machine Config Operator abstracts away the low-level details of node management, providing a declarative, Kubernetes-native way to manage the underlying operating system and cluster services. This is a key feature of OpenShift's integrated and opinionated approach to cluster management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment