AWS Air-gapped FIPS: Create an Image
To create an Image using Konvoy Image Builder (KIB) for use in an air-gapped cluster, follow these instructions. AMI images contain configuration information and software to create a specific, pre-configured, operating environment. For example, you can create an AMI image of your current computer system settings and software. The AMI image can then be replicated and distributed, creating your computer system for other users. You can use overrides files to customize some of the components installed on your machine image. For example, you could tell KIB to install the FIPS versions of the Kubernetes components.
Prerequisites
Minimal IAM Permissions for KIB to create an Image for an AWS account using Konvoy Image Builder.
In previous DKP releases, AMI images provided by the upstream CAPA project would be used if you did not specify an AMI. However, the upstream images are not recommended for production and may not always be available. Therefore, DKP now requires you to specify an AMI when creating a cluster. To create an AMI, use Konvoy Image Builder.
Explore the Customize your Image topic for more options.
Using KIB, you can build an AMI without requiring access to the internet by providing an additional --override
flag.
In previous DKP releases, the distro package bundles were included in the downloaded air-gapped bundle. Currently, that air-gapped bundle contains the following artifacts with the exception of the distro packages:
DKP Kubernetes packages
Python packages (provided by upstream)
Containerd tarball
Download
dkp-air-gapped-bundle_v2.8.1_linux_amd64.tar.gz
, and extract the tarball to a local directory:CODEtar -xzvf dkp-air-gapped-bundle_v2.8.1_linux_amd64.tar.gz && cd dkp-v2.8.1/kib
You will need to fetch the distro packages as well as other artifacts. By fetching the distro packages from distro repositories, you get the latest security fixes available at machine image build time.
In your download location, In your download location with internet access, you need to create an OS package bundle for the Target OS you use for the nodes in your DKP cluster. To create it, run the new DKP command
create-package-bundle
. This builds an OS bundle using the Kubernetes version defined inansible/group_vars/all/defaults.yaml
. Example command:CODE./konvoy-image create-package-bundle --os redhat-8.4 --output-directory=artifacts
Other supported air-gapped Operating Systems (OSs) can be specified in place of
--os redhat-8.4
using the flag and corresponding OS name:centos-7.9
redhat-7.9
redhat-8.6
redhat-8.8
rocky-9.1
ubuntu-20.04
NOTE: For FIPS, pass the flag:
--fips
NOTE: For RHEL OS, pass your RedHat subscription/licensing manager credentials: Example command:CODEexport RHSM_ACTIVATION_KEY="-ci" export RHSM_ORG_ID="1232131"
OR
CODEexport RHSM_USER="" export RHSM_PASS=""
Follow the instructions below to build an AMI.
Offline FIPS Override File (Air-gapped)
Add the following FIPS offline override file to your environment:
--overrides overrides/offline-fips.yaml
# fips os-packages
os_packages_local_bundle_file: "{{ playbook_dir }}/../artifacts/{{ kubernetes_version }}_{{ ansible_distribution|lower }}_{{ ansible_distribution_major_version }}_x86_64_fips.tar.gz"
containerd_local_bundle_file: "{{ playbook_dir }}/../artifacts/{{ containerd_tar_file }}"
pip_packages_local_bundle_file: "{{ playbook_dir }}/../artifacts/pip-packages.tar.gz"
images_local_bundle_dir: "{{ playbook_dir}}/../artifacts/images"
You can find all available Overrides files in the Konvoy Image Builder repo.
An air-gapped example of override file use is the command below which produces an AWS FIPS-compliant image on RHEL 8.4:
konvoy-image build --overrides overrides/offline-fips.yaml images/ami/rhel-84.yaml