×

Managing machines with the Cluster API is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

The following example YAML files show how to make the Cluster API primary resources work together and configure settings for the machines that they create that are appropriate for your environment.

Sample YAML for a Cluster API cluster resource

The cluster resource defines the name and infrastructure provider for the cluster and is managed by the Cluster API. This resource has the same structure for all providers.

apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: <cluster_name> (1)
  namespace: openshift-cluster-api
spec:
  controlPlaneEndpoint: (2)
    host: <control_plane_endpoint_address>
    port: 6443
  infrastructureRef:
    apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    kind: <infrastructure_kind> (3)
    name: <cluster_name>
    namespace: openshift-cluster-api
1 Specify the name of the cluster.
2 Specify the IP address of the control plane endpoint and the port used to access it.
3 Specify the infrastructure kind for the cluster. The following values are valid:
Cluster cloud provider Value

Amazon Web Services

AWSCluster

GCP

GCPCluster

Azure

AzureCluster

OpenStack

OpenStackCluster

VMware vSphere

VSphereCluster

Provider-specific configuration options