Install an unmanaged CNI plugin
To install an unmanaged CNI plugin on a fresh installation of MKE 4k:
Verify that your system meets all MKE 4k and third-party CNI plugin requirements.
Install MKE 4k with the custom provider as the only enabled provider in the installation YAML file. This requires you to specify configuration for the MKE cluster in YAML format and can be achieved using one of the below steps [3-5] depending on your circumstances.
You can obtain yq at https://github.com/mikefarah/yq.
Create the YAML configuration file.
Generate the YAML configuration:
mkectl init| yq 'del(.spec.network.providers)'|yq '.spec.network.providers |= ([{"enabled": true, "provider": "custom"}])'
Save the YAML configuration to a YAML file, for example
mke4k.yaml
, and edit the file to set other desired configurations prior to using the file for installation.
Alternatively, in the event that your final cluster configuration with all your customizations is already present in the
mke4.yaml
configuration file but it is using the default CNI, you can change it to use an unmanaged CNI:yq 'del(.spec.network.providers)' mke4.yaml|yq '.spec.network.providers |=([{"enabled": true, "provider": "custom"}])' > mke4.yaml.tmp && mv mke4.yaml.tmp mke4.yaml
ℹ️Steps 3 and 4 assume that your installation employs MKE-s default IPv4 cluster
CIDR[192.168.0.0/16]
. To set an alternative value, refer to the following example, which explicitly specifies192.158.0.0/16
as the IPv4 cluster CIDR instead rather than the default:yq 'del(.spec.network.providers)' mke4.yaml|yq '.spec.network.providers |= ([{"enabled": true, "provider": "custom,", "extraConfig":{"cidrV4": "192.158.0.0/16"}}])' > mke4.yaml.tmp && mv mke4.yaml.tmp mke4.yaml
Apply the
mke4.yaml
configuration file to initiate MKE 4k installation:mkectl apply -f mke4.yaml <timeout-specifications>
ℹ️For information on configuring appropriate timeout specifications, refer to Configuring time windows for network bootstrapping.Once the installation reaches the point where cluster networking is being verified, install your chosen CNI. Look for the following indicators to know when this stage has been reached:
INF k0s cluster installed
INF using port 80 to verify networking
INF waiting 10 minutes for cluster networking to be established using custom CNI provider
Refer to Considerations and Best Practices for practical tips on how to successfully install an unmanaged CNI on an MKE 4k cluster.
Once the unmanaged CNI is installed, it has reached a state of being fully functional, and MKE 4k has verified that cluster networking is in the desired state, the installation will continue, as indicated:
INF Cleaning resources used for verifying networking
INF Confirmed available networking
Note that while the unmanaged CNI is being installed, MKE 4k constantly checks whether cluster networking has been established. Thus, you need not be concerned over whether the specification of a large timeout value will needlessly add to cluster readiness wait time.