This provider implementation is currently in alpha state.
Supported Operating Systems
Only Flatcar Linux is currently supported and you explicitly have to set the provisioning mechanism
to cloud-init by setting machine.spec.providerSpec.value.operatingSystemSpec.provisioningUtility
to cloud-init
.
An example MachineDeployment can be found here:
examples/anexia-machinedeployment.yaml:
Example machinedeployment.yaml
apiVersion: "cluster.k8s.io/v1alpha1"
kind: MachineDeployment
metadata:
name: anexia-machinedeployment
namespace: kube-system
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
name: anexia-machinedeployment
template:
metadata:
labels:
name: anexia-machinedeployment
spec:
providerSpec:
value:
cloudProvider: anexia
sshPublicKeys:
- "<< YOUR_PUBLIC_KEY >>"
cloudProviderSpec:
# If empty, can be set via ANXCLOUD_TOKEN env var
token:
secretKeyRef:
namespace: kube-system
name: machine-controller-anexia
key: token
# Currently only the "Flatcar Linux Stable" template is supported.
# Use templateBuild to specify a build. If empty => latest
# Alternatively use templateID for a specific template.
template: "<< ANEXIA_TEMPLATE_NAME >>"
locationID: "<< ANEXIA_LOCATION_ID >>"
cpus: 2
memory: 2048
# this defaults to "performance", but you can set anything
# supported by the Anexia Engine here - or not set this attribute
# at all
cpuPerformanceType: standard
disks:
- size: 60
performanceType: ENT6
# Each entry in this array will create a network interface in each
# Machine, connected to the given VLAN.
networks:
- vlan: "<< ANEXIA_VLAN_ID >>"
# If prefixes are given, we reserve an IP address for each of
# them - if you give one IPv4 and one IPv6 prefix, your
# Machines will have dual-stack connectivity
#
# As an compatibility-aid for the old cloudProviderSpec.vlanID,
# which reserved an IP for the configured VLAN, you can also
# have an entry "" (empty string) to get the same behavior -
# but this is not recommended.
#
# Not configuring any prefix might be useful if you want to
# configure IP addresses on this interface via other means,
# e.g. a Layer2 load balancer.
#
# Each MachineDeployment needs at least one Network with at
# least one Prefix, because we have to know (and thus, reserve)
# at least one IP address for each Machine.
prefixes:
- "<< ANEXIA_PREFIX_ID >>"
# You may have this old disk config attribute in your config - please migrate to the disks attribute.
# For now it is still recognized though.
#diskSize: 60
# Flatcar is the only supported operating system
operatingSystem: "flatcar"
operatingSystemSpec:
# Force cloud-init instead of ignition. Anexia supports cloud-init only.
provisioningUtility: "cloud-init"
distUpgradeOnBoot: false
disableAutoUpdate: true
versions:
kubelet: 1.30.5
Templates
You can configure the template to use by its name (using the attribute template
) or its identifier
(using the attribute templateID
).
When specifying the template by its name, the template build to use can optionally be set (attribute
templateBuild
). Omitting templateBuild
will yield the latest available build (at time the time
of creating the Machine
) for the specified named template.
Template identifiers (attribute templateID
) always link to a given template
-templateBuild
combination, so using the identifier in configuration has the same drawback as specifying an exact
build to use.
Templates are rotated pretty often to include security patches and other updates. Outdated versions
of templates are not retained and get removed after some time. Because of this, we do not recommend
using the templateID
attribute or pinning to a fixed build unless really required.
To retrieve all available templates against a given location:
https://engine.anexia-it.com/api/vsphere/v1/provisioning/templates.json/<location identifier>/templates?page=1&limit=50&api_key=<API Key>