### Install ARM64 Specific Dependencies and Setup Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/packer/maas/README.md Installs QEMU system ARM and libvirt daemon, and creates EFI disk images required for building ARM64 images. ```bash apt-get install qemu-system-arm libvirt-daemon-system -y # create EFI disk images for ARM64 pushd /var/lib/libvirt/images/ dd if=/dev/zero of=capi.fd bs=1M count=64 dd if=/dev/zero of=capi-nvmram.fd bs=1M count=64 dd if=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd of=capi.fd conv=notrunc popd ``` -------------------------------- ### Install Build Dependencies for AMI Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/aws.md Run this command to install the necessary dependencies for building AMIs. ```bash make deps-ami ``` -------------------------------- ### Install Build Dependencies for OVA Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/vsphere.md Run this command to install the necessary dependencies before building OVA images. ```bash make deps-ova ``` -------------------------------- ### Install Scaleway Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/scaleway.md Run this command to install the necessary dependencies for building Scaleway images. ```bash make deps-scaleway ``` -------------------------------- ### Install Dependencies for Outscale Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/3dsoutscale.md Run this command to install the necessary dependencies for building Outscale images. Ensure you are in the 'images/capi' directory. ```bash make deps-osc ``` -------------------------------- ### Install Vultr Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/vultr.md Run this command to install the necessary dependencies for building Vultr images. ```bash make deps-vultr ``` -------------------------------- ### Install Build Dependencies on Ubuntu Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/packer/maas/README.md Installs necessary packages like make, jq, unzip, and python3-pip, and fetches QEMU dependencies for image building. ```bash apt update apt install -y make jq unzip python3-pip cd images/capi make deps-qemu ``` -------------------------------- ### Install build dependencies for QEMU images Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/openstack.md Installs the necessary dependencies for building QEMU-based images using the image-builder tool. Navigate to the correct directory first. ```bash cd image-builder/images/capi make deps-qemu ``` -------------------------------- ### Install raw image build dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/raw.md Navigate to the image-builder/images/capi directory and run 'make deps-raw' to install the build prerequisites for raw images. ```bash cd image-builder/images/capi make deps-raw ``` -------------------------------- ### Install HuaweiCloud Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/huaweicloud.md Run this command to install the necessary dependencies for building HuaweiCloud images. ```bash make deps-huaweicloud ``` -------------------------------- ### Install Azure Build Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/azure.md Run this command to install the necessary dependencies for building Azure images. ```bash make deps-azure ``` -------------------------------- ### Install Dependencies for DigitalOcean Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/digitalocean.md Run this command to install the necessary dependencies for building DigitalOcean images. ```bash make deps-do ``` -------------------------------- ### Install image-builder dependencies for QEMU Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/cloudstack.md Navigates to the image-builder CAPI directory and installs dependencies required for building QEMU-based images. This command should be run from the root of the cloned repository. ```bash $ cd image-builder/images/capi $ make deps-qemu ``` -------------------------------- ### Install Oxide Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/oxide.md Run this command to install necessary dependencies for building Oxide images. Ensure you are in the 'images/capi' directory. ```bash make deps-oxide ``` -------------------------------- ### Install MaaS Client Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/maas.md Installs the MaaS command-line client and its dependencies on an Ubuntu system. This is required for interacting with the MaaS API. ```bash apt update && apt install -y tzdata software-properties-common apt-add-repository -y ppa:maas/3.5 apt install -y maas-cli python3-openssl ``` -------------------------------- ### Install OCI Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/oci.md Run this command from the images/capi directory to install the necessary dependencies for OCI image building. ```bash make deps-oci ``` -------------------------------- ### Install Dependencies with Make Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/quickstart.md Execute `make deps` to install Packer and Ansible if they are not already present on your system. Dependencies will be installed into `./.bin` within the `images/capi` directory. ```sh make deps ``` -------------------------------- ### Install Dependencies for PowerVS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/ibmcloud.md Clone the image-builder repository and install the necessary dependencies for building PowerVS images. ```bash git clone https://github.com/kubernetes-sigs/image-builder.git cd image-builder/images/capi/ make deps-powervs ``` -------------------------------- ### Build Container Image with Makefile Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/container-image.md Run this command to build the container image. Ensure Docker is installed on your machine. ```command make docker-build ``` -------------------------------- ### Install Hcloud Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/hcloud.md Installs the necessary dependencies for building Hcloud images. Run this command from the 'images/capi' directory. ```bash make deps-hcloud ``` -------------------------------- ### Install Proxmox Build Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/proxmox.md Run this command from the images/capi directory to install the necessary build prerequisites for Proxmox VM templates. ```bash make deps-proxmox ``` -------------------------------- ### Install All Windows Updates by Category Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/windows/windows.md Use this to install all available updates from all categories. Specify update categories in packer/config/windows/common.json. ```json "windows_updates_categories": "CriticalUpdates SecurityUpdates UpdateRollups" ``` -------------------------------- ### Install OpenStack Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/openstack-remote.md Run this command to install the necessary dependencies for OpenStack builds within the image-builder project. ```bash cd image-builder/images/capi make deps-openstack ``` -------------------------------- ### Install qemu-kvm and related packages on Ubuntu Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/cloudstack.md Installs the necessary packages for KVM hypervisor support on Ubuntu 18.04 LTS. Ensure you are running as root. ```bash $ sudo -i # apt install qemu-kvm libvirt-bin qemu-utils ``` -------------------------------- ### Install QEMU KVM and related packages on Ubuntu 18.04 LTS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/openstack.md Installs necessary packages for using qemu-img on Ubuntu 18.04 LTS. Ensure you are running as root. ```bash sudo -i # apt install qemu-kvm libvirt-bin qemu-utils ``` -------------------------------- ### Install Dependencies for Nutanix Builder Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/nutanix.md Clone the image-builder repository and install Ansible and Packer using the make target. ```bash # If you don't have the image-builder repository $ git clone https://github.com/kubernetes-sigs/image-builder.git $ cd image-builder/images/capi/ # Run the target make deps-nutanix to install Ansible and Packer $ make deps-nutanix ``` -------------------------------- ### Install Specific Windows Updates by KB Number Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/windows/windows.md Use this to install specific updates by their KB numbers. Specify KB numbers in packer/config/windows/common.json. ```json "windows_updates_kbs": "KB4580390 KB4471332" ``` -------------------------------- ### vSphere Builder Configuration Example Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/vsphere.md This JSON structure defines the required parameters for the vSphere builder. Ensure all fields are accurately populated with your vSphere environment details. The 'cluster' field can be substituted with 'host' if needed. ```json { "vcenter_server":"FQDN of vcenter", "username":"vcenter_username", "password":"vcenter_password", "datastore":"template_datastore", "folder": "template_folder_on_vcenter", "cluster": "esxi_cluster_used_for_template_creation", "network": "network_attached_to_template", "insecure_connection": "false", "template": "base_template_used_by_clone_builder", "create_snapshot": "creates a snaphot on base OVA after building", "linked_clone": "Uses link cloning in vsphere-clone builder: true, by default" } ``` -------------------------------- ### Clone Image Builder Repository and Install Dependencies Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/gcp.md Clone the image-builder repository if you haven't already, navigate to the CAPI directory, and run the make target to install Ansible and Packer. ```bash # If you don't have the image-builder repository $ git clone https://github.com/kubernetes-sigs/image-builder.git $ cd image-builder/images/capi/ # Run the target make deps-gce to install Ansible and Packer $ make deps-gce ``` -------------------------------- ### Pass Extra Packages via JSON Var File Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/capi.md Define extra RPM packages to install in the image by creating a JSON var file and specifying the 'extra_rpms' variable. Ensure proper quoting for spaces. ```json { "extra_rpms": "\"nfs-utils net-tools\"" } ``` -------------------------------- ### Build OCI Image with Packer VAR File Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/oci.md Use this command to build an OCI image, specifying your custom Packer VAR file and the desired OS. This example builds an Oracle Linux 9 image. ```bash PACKER_VAR_FILES=oci.json make build-oci-oracle-linux-9 ``` -------------------------------- ### Initialize CNI Plugins and Configuration Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/aws.md This shell script initializes the CNI (Container Network Interface) plugins and creates necessary configuration files for network setup within a containerized environment. It downloads CNI plugins and defines bridge network settings. ```sh mkdir -p /etc/cni/net.d wget -q https://github.com/containernetworking/plugins/releases/download/v0.7.0/cni-plugins-amd64-v0.7.0.tgz tar -xzf cni-plugins-amd64-v0.7.0.tgz --directory /etc/cni/net.d cat >/etc/cni/net.d/10-mynet.conf </etc/cni/net.d/99-loopback.conf < # Export the path to the service account credentials created in the step above $ export GOOGLE_APPLICATION_CREDENTIALS= ``` -------------------------------- ### Promote Image to Production using Make Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/releasing.md Promotes the built container image to the production registry using a make command. Requires a GitHub token and a clone of the k8s.io repository. ```bash export GITHUB_TOKEN= make -C images/capi promote-image ``` -------------------------------- ### Build GCE Ubuntu Images Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/gcp.md Use the make build-gce-ubuntu- command to generate specific Ubuntu images, or use make build-gce-all to build all supported Ubuntu versions. ```bash $ make build-gce-ubuntu-2404 ``` ```bash make build-gce-all ``` -------------------------------- ### AMD GPU Driver Installation Configuration Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/ansible/roles/gpu/README.md This configuration installs AMD GPU drivers. It's recommended to review AMDGPU_Installer use-cases to ensure the correct version and use case are supplied, as some use cases (e.g., 'rocm') install significant libraries. ```json { "ansible_user_vars": "gpu_vendor=amd amd_version=6.0.2 amd_deb_version=6.0.60002-1 amd_usecase=dkms", "node_custom_roles_pre": "gpu" } ``` -------------------------------- ### Build Azure Hyper-V Generation 1 and 2 Images Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/azure.md Demonstrates the commands for building both Generation 1 and Generation 2 Hyper-V VHD images for Azure. Generation 2 images have '-gen2' appended to their name. ```bash # Generation 1 image make build-azure-sig-ubuntu-2204 # Generation 2 image make build-azure-sig-ubuntu-2204-gen2 ``` -------------------------------- ### Custom Goss Command ServerSpec Example Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/goss/goss.md Example of adding a custom command to Goss tests, checking for a specific CLI version. ```yaml some_cli --version: exit-status: 0 stdout: [{{ .Vars.some_cli_version }}] stderr: [] timeout: 0 ``` -------------------------------- ### Build a QCOW2 Ubuntu 22.04 CAPI image Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/raw.md Clone the image-builder repository, navigate to the directory, and execute 'make build-qemu-ubuntu-2204' to build a Ubuntu 22.04-based QCOW2 CAPI image. ```bash $ git clone https://github.com/kubernetes-sigs/image-builder.git $ cd image-builder/images/capi/ $ make build-qemu-ubuntu-2204 ``` -------------------------------- ### Build Ubuntu 24.04 CAPI Image Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/ibmcloud.md Clone the image-builder repository and navigate to the `images/capi` directory to build a QEMU-based Ubuntu 24.04 image for CAPI. ```bash $ git clone https://github.com/kubernetes-sigs/image-builder.git $ cd image-builder/images/capi/ $ make build-qemu-ubuntu-2404 ``` -------------------------------- ### Build Hcloud Image for Ubuntu 24.04 Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/hcloud.md Builds an Ubuntu 24.04 snapshot in Hetzner Cloud. Replace 'ubuntu-2404' with other OS options like 'ubuntu-2204', 'flatcar', etc., as listed by 'make help'. ```bash make build-hcloud-ubuntu-2404 ``` -------------------------------- ### Build Proxmox Image with Credentials and Volume Mount Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/container-image.md Build a Proxmox image for Ubuntu 22.04. This requires a `proxmox.env` file for credentials and a volume mount for downloaded ISOs. The `--net=host` option is Linux-specific. ```shell PROXMOX_BRIDGE=vmbr0 PROXMOX_ISO_POOL=tower PROXMOX_NODE=pve-c PROXMOX_STORAGE_POOL=cephfs PROXMOX_TOKEN=xxxxxxxx PROXMOX_URL=https://1.2.3.4:8006/api2/json PROXMOX_USERNAME=capmox@pve!capi ``` ```command docker run -it --rm --net=host --env-file proxmox.env \ -v /tmp:/home/imagebuilder/images/capi/downloaded_iso_path \ registry.k8s.io/scl-image-builder/cluster-node-image-builder-amd64:v0.1.38 build-proxmox-ubuntu-2204 ``` -------------------------------- ### Build Proxmox VM Template for Ubuntu 22.04 Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/proxmox.md After setting up dependencies and configuring environment variables, use this command to build the Ubuntu 22.04 Proxmox VM template. ```bash make build-proxmox-ubuntu-2204 ``` -------------------------------- ### Override Packer Binary Path Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/packer.md Use a specific Packer binary already installed on your system by setting the PACKER_BIN environment variable. This is useful for testing or using a custom Packer installation. ```bash export PACKER_BIN=/usr/local/bin/packer make deps-azure make build-azure-sig-ubuntu-2404 ``` -------------------------------- ### Flatcar NVIDIA (sysext) Driver Installation Configuration Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/ansible/roles/gpu/README.md This configuration installs NVIDIA drivers on Flatcar using the systemd-sysext mechanism. It specifies the driver sysext name and the URL/filename for the nvidia-runtime sysext image. ```json { "ansible_user_vars": "gpu_vendor=nvidia gpu_flatcar_nvidia_sysext_name=nvidia-drivers-570 gpu_flatcar_nvidia_runtime_url=https://extensions.flatcar.org/extensions/nvidia-runtime-v1.17.9-x86-64.raw gpu_flatcar_nvidia_runtime_filename=nvidia-runtime-v1.17.9-x86-64.raw", "node_custom_roles_pre": "gpu" } ``` -------------------------------- ### Build Outscale Image for a Specific OS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/3dsoutscale.md Use this make command to build an image for a specific operating system on Outscale. Replace '' with the desired OS (e.g., 'ubuntu-2204'). List available options with 'make help'. ```bash make build-osc- ``` -------------------------------- ### Build AMI with AWS Credentials from Env File Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/container-image.md Build an AMI using Ubuntu 24.04 by providing AWS credentials via an environment file. Create an `aws-creds.env` file with your credentials. ```shell AWS_ACCESS_KEY_ID=xxxxxxx AWS_SECRET_ACCESS_KEY=xxxxxxxx ``` ```command docker run -it --rm --env-file aws-creds.env registry.k8s.io/scl-image-builder/cluster-node-image-builder-amd64:v0.1.52 build-ami-ubuntu-2404 ``` -------------------------------- ### NVIDIA vGPU Driver Installation Configuration Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/ansible/roles/gpu/README.md Use this configuration to install NVIDIA vGPU drivers. Ensure you have the .run and .tok files from NVIDIA available from an S3 endpoint. Omit `gridd_feature_type` and `nvidia_tok_location` if not required. Add `gpu_nvidia_ceph=true` to `ansible_user_vars` if using CEPH S3. ```json { "ansible_user_vars": "gpu_vendor=nvidia nvidia_s3_url=https://s3-endpoint nvidia_bucket=nvidia nvidia_bucket_access=ACCESS_KEY nvidia_bucket_secret=SECRET_KEY nvidia_installer_location=NVIDIA-Linux-x86_64-525.85.05-grid.run nvidia_tok_location=client_configuration_token.tok gridd_feature_type=4", "node_custom_roles_pre": "gpu" } ``` -------------------------------- ### Build Node OVA with Extra Packages Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/capi.md Execute the build command, referencing the var file containing extra packages, to create a customized node OVA. ```sh PACKER_VAR_FILES=extra_vars.json make build-node-ova-local-photon-5 ``` -------------------------------- ### Build Image with HTTP Proxy Configuration Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/capi.md Execute the image build process with the specified HTTP proxy configuration. ```sh PACKER_VAR_FILES=proxy.json make build-node-ova-local-photon-5 ``` -------------------------------- ### Download Image Builder Source (Git Clone) Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/quickstart.md Clone the image-builder repository using Git to easily track updates. This method requires Git to be installed. ```sh git clone git@github.com:kubernetes-sigs/image-builder.git cd image-builder/images/capi ``` -------------------------------- ### Download Image Builder Source (Tarball) Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/quickstart.md Use this command to download the latest image-builder source code as a tarball and extract it. Ensure you have `curl` and `tar` installed. ```sh curl -L https://github.com/kubernetes-sigs/image-builder/tarball/main -o image-builder.tgz mkdir image-builder tar xzf image-builder.tgz --strip-components 1 -C image-builder rm image-builder.tgz cd image-builder/images/capi ``` -------------------------------- ### Build Node OVA for vSphere Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/vsphere.md Use this make command to build a node OVA for a specified hypervisor and operating system. Replace placeholders with your target environment. ```bash make build-node-ova-- ``` -------------------------------- ### Enable Security Tools with Ansible User Vars Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/ansible/roles/security/README.md Configure the security role to install Trivy and Falco by setting the appropriate ansible_user_vars. This can be used in conjunction with node_custom_roles_pre or node_custom_roles_post. ```json { "ansible_user_vars": "security_install_falco=true security_install_trivy=true", "node_custom_roles_pre": "security" } ``` -------------------------------- ### Enable gVisor Runtime in Packer Configuration Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/containerd/customizing-containerd.md Set `containerd_gvisor_runtime` to `true` in your Packer configuration to install gVisor and its containerd configuration. Optionally specify `containerd_gvisor_version` for a specific point release. ```json { "containerd_gvisor_runtime": "true", "containerd_gvisor_version": "yyyymmdd", } ``` -------------------------------- ### Build a CloudStack Ubuntu 24.04 CAPI image with QEMU Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/cloudstack.md Clones the image-builder repository, sets up extra variables for CloudStack provider, and builds a QEMU-based Ubuntu 24.04 image for CAPI. Ensure you are in the 'image-builder/images/capi/' directory before running the make command. ```bash $ git clone https://github.com/kubernetes-sigs/image-builder.git $ cd image-builder/images/capi/ $ cat > extra_vars.json < with the desired OS name (e.g., ubuntu, centos). ```bash make build-ami- ``` -------------------------------- ### Build HuaweiCloud Image for Specific OS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/huaweicloud.md Build an image for a specific operating system on HuaweiCloud. Use `make help` to see available OS options. ```bash make build-huaweicloud- ``` -------------------------------- ### Update Release Documentation Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/releasing.md Runs a make target to automatically update documentation files that reference the latest release, preparing for a pull request. ```bash make update-release-docs ``` -------------------------------- ### Build Image with Internal Mirror Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/capi.md Execute the image build process using a custom repository configuration file. ```sh PACKER_VAR_FILES=internal_repos.json make build-node-ova-local-photon-5 ``` -------------------------------- ### Convert KVM image to XenServer format Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/cloudstack.md Converts a previously built KVM qcow2 image into a XenServer compatible .vhd format. Replace '' with the actual name of your built image artifact. ```bash $ ./hack/convert-cloudstack-image.sh ./output// x ``` -------------------------------- ### Add user to kvm group and set permissions Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/openstack.md Adds your user to the 'kvm' group for access and sets appropriate ownership for the /dev/kvm device. Log out and back in after execution. ```bash sudo usermod -a -G kvm sudo chown root:kvm /dev/kvm ``` -------------------------------- ### Configure Containerd Metrics Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/capi.md Enable containerd metrics by creating a TOML file in the containerd configuration directory with the desired metrics endpoint. ```toml [metrics] address = "0.0.0.0:1338" grpc_histogram = false ``` -------------------------------- ### Build AMI with AWS Credentials Mounted Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/container-image.md Build an AMI using Ubuntu 24.04. Mount your local AWS credentials to the container. Ensure your AWS CLI is configured. ```command docker run -it --rm -v /Users//.aws:/home/imagebuilder/.aws registry.k8s.io/scl-image-builder/cluster-node-image-builder-amd64:v0.1.52 build-ami-ubuntu-2404 ``` -------------------------------- ### Build Oxide Image for Specific OS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/oxide.md Execute this make command to build an image for a specific operating system on Oxide. Replace '' with the desired OS name (e.g., ubuntu-2404). Use 'make help' to see available OS options. ```bash make build-oxide- ``` -------------------------------- ### Upload Image to MaaS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/maas.md Uploads a custom boot resource to MaaS. Use the .tar.gz file of your built image. Adjust 'base_image' based on your Ubuntu version. ```bash cd images/capi/output/ubuntu-2204-efi-kube-v1.30.5/ maas admin boot-resources create name=custom/your-image architecture=amd64/generic title=your-image subarches=generic base_image=ubuntu/jammy content@=./ubuntu-2204-efi-kube-v1.30.5.tar.gz ``` -------------------------------- ### Upload AMD64 Image to MAAS Source: https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/packer/maas/README.md Uploads a generated AMD64 image to MAAS as a boot resource. Replace placeholders with your specific profile, image name, and file path. ```bash maas boot-resources create name= architecture=amd64/generic title= base_image=ubuntu/ content@=./.tar.gz ``` -------------------------------- ### Build All HuaweiCloud Images in Parallel Source: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/providers/huaweicloud.md Build all available operating system images for HuaweiCloud in parallel. This command leverages the `-j` flag for concurrent builds. ```bash make -j build-huaweicloud-all ```