Zum Inhalt springen

Boot customization

Zuletzt aktualisiert am

The boot behavior of an image can be customized to configure essential settings—such as network interfaces, proxy settings, or kernel flags—before a node joins a cluster.

How you customize the boot behavior depends on the Talos version you are using:

For v1.13.10-stackit.v1.8.5 and newer, configure boot customization using embedded machine configuration directly inside the image schematic.

Using embedded machine configuration (CLI)

Section titled “Using embedded machine configuration (CLI)”

Prerequisites:

  • Successfully authenticated with a STEC instance.
  • The kubeconfig for the STEC instance is exported in your terminal session.
  • Tools: a generic Linux bash terminal and kubectl.

Steps:

  1. Follow the generic image creation steps as described in the getting started guide.

  2. In the EdgeImage manifest, define the configuration document inside spec.schematic.customization.embeddedMachineConfiguration. To configure low-level kernel parameters (such as enabling the console or dashboard), define extraKernelArgs:

    Terminal window
    cat <<EOF | kubectl apply -f -
    apiVersion: edge.stackit.cloud/v1alpha1
    kind: EdgeImage
    metadata:
    name: custom-boot-image
    namespace: default
    spec:
    talosVersion: v1.13.10-stackit.v1.8.5
    schematic: |
    customization:
    extraKernelArgs:
    - talos.dashboard.disabled=0
    systemExtensions:
    officialExtensions: []
    embeddedMachineConfiguration: |
    apiVersion: v1alpha1
    kind: EnvironmentConfig
    env:
    http_proxy: http://proxy.example.local:8080
    https_proxy: http://proxy.example.local:8080
    no_proxy: localhost,127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.cluster.local.,.cluster.local,.svc,.svc.
    overlay: {}
    EOF
  3. Confirm that the image resource exists:

    Terminal window
    kubectl get edgeimage custom-boot-image
  4. Download and flash the boot medium as described in the image creation procedure. When the host boots, it automatically applies the embedded configuration.

You can check whether your nodes have applied the embedded configuration using talosctl.

Prerequisites:

Steps:

  1. Set your TALOSCONFIG environment variable:

    Terminal window
    export TALOSCONFIG=your-edge-cluster.talosconfig.yaml
  2. Query the environment configuration from a node:

    Terminal window
    talosctl -n $NODE_IP -e $NODE_IP get environments -o yaml

    The output reflects the embedded proxy settings:

    node: 192.168.1.50
    metadata:
    namespace: config
    type: EnvironmentConfigs.config.talos.dev
    id: environment
    version: 1
    spec:
    env:
    http_proxy: http://proxy.example.local:8080
    https_proxy: http://proxy.example.local:8080
    no_proxy: localhost,127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.cluster.local.,.cluster.local,.svc,.svc.