# Aws Cluster Api

This document describe how to create and manage Kubernetes clusters on AWS using Cluster API in PMK. For more information about PMK's integration with Cluster API, please read [auto$](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/platform9-cluster-api-integration/README.md) first.

{% hint style="warning" %}
**Important**

PMK has introduced a new way to create PMK Kubernetes clusters on AWS. This new and superior mechanism uses the Kubernetes Cluster API behind the scenes and provides a larger set of features to better enable you to create Kubernetes clusters on AWS using EC2 instances. If you are interested in the legacy PMK mechanism for creating clusters on AWS, refer to [auto$](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/aws-prerequisites/README.md) instead.
{% endhint %}

Platform9 supports creating AWS Native Clusters on EC2 Instances using Kubernetes [Cluster API(CAPI)](https://cluster-api.sigs.k8s.io/) and Platform9 CAPI conformant APIs. The Cluster API brings declarative, Kubernetes-style APIs to cluster creation, configuration and management.

## Platform9 Cluster API Clusters (Pf9-CAPI) API Architecture

<figure><img src="/files/TnHhee9u69UcLY5FJLpv" alt=""><figcaption></figcaption></figure>

## Provider Version Matrix

PMK AWS CAPI Clusters are managed by multiple Cluster API providers. More: [auto$](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/platform9-cluster-api-integration/README.md)

| Provider Type  | Provider                                                                                                              | Version            |
| -------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------ |
| Core           | [Cluster API(CAPI)](https://github.com/kubernetes-sigs/cluster-api)                                                   | 1.1.5              |
| Infrastructure | [Cluster API Infrastructure Provider AWS (CAPA)](https://github.com/kubernetes-sigs/cluster-api-provider-aws)         | 1.4.1              |
| Bootstrap      | [Cluster API Bootstrap Provider Nodelet (CABPN)](https://github.com/platform9/cluster-api-bootstrap-provider-nodelet) | Platform9 Internal |
| Control Plane  | [Cluster API Nodelet Control Plane Nodelet (CACPN)](https://github.com/platform9/cluster-api-nodelet-control-plane)   | Platform9 Internal |

## APIs

List of all the APIs used to create an AWS CAPI Cluster.

| CAPI APIs                                                                                                                               | CAPA APIs                                                                                                                                                                          | CACPN APIs                                                                                                                                                               | CABPN APIs                                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Cluster](https://github.com/kubernetes-sigs/cluster-api/blob/main/config/crd/bases/cluster.x-k8s.io_clusters.yaml)                     | [AWSCluster](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml)                              | [NodeletControlPlane](https://github.com/platform9/cluster-api-nodelet-control-plane/blob/main/config/crd/bases/controlplane.cluster.x-k8s.io_nodeletcontrolplanes.yaml) | [NodeletConfigTemplate](https://github.com/platform9/cluster-api-bootstrap-provider-nodelet/blob/main/config/crd/bases/bootstrap.cluster.x-k8s.io_nodeletconfigtemplates.yaml) |
| [MachineDeployment](https://github.com/kubernetes-sigs/cluster-api/blob/main/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml) | [AWSClusterStaticIdentity](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterstaticidentities.yaml) |                                                                                                                                                                          | [NodeletConfig](https://github.com/platform9/cluster-api-bootstrap-provider-nodelet/blob/main/config/crd/bases/bootstrap.cluster.x-k8s.io_nodeletconfigs.yaml)                 |
| [MachinePool](https://github.com/kubernetes-sigs/cluster-api/blob/main/config/crd/bases/cluster.x-k8s.io_machinepools.yaml)             | [AWSClusterRoleIdentity](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusterroleidentities.yaml)     |                                                                                                                                                                          |                                                                                                                                                                                |
|                                                                                                                                         | [AWSMachineTemplate](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinetemplates.yaml)              |                                                                                                                                                                          |                                                                                                                                                                                |
|                                                                                                                                         | [AWSMachinePool](https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmachinepools.yaml)                      |                                                                                                                                                                          |                                                                                                                                                                                |

## Example Cluster Topology

<figure><img src="/files/9664NKdDMBSBqfp8GWCy" alt=""><figcaption></figcaption></figure>

### References

Cluster API Book : <https://cluster-api.sigs.k8s.io/>

Cluster API AWS Provider Book : <https://cluster-api-aws.sigs.k8s.io/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-kubernetes/5.7/aws-cluster-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
