diff --git a/docs/aws/hosted-control-plane.md b/docs/aws/hosted-control-plane.md index 7fbd8b76..58b0be22 100644 --- a/docs/aws/hosted-control-plane.md +++ b/docs/aws/hosted-control-plane.md @@ -17,7 +17,9 @@ The networking resources in AWS which are needed for a managed cluster can be reused with a management cluster. If you deployed your AWS Kubernetes cluster using Cluster API Provider AWS (CAPA) -you can obtain all the necessary data with the commands below: +you can obtain all the necessary data with the commands below or use the +template found below in the +[HMC Deployment manifest generation](#hmc-deployment-manifest-generation) section. **VPC ID** @@ -76,4 +78,34 @@ With all the collected data your `Deployment` manifest will look similar to this - sg-0e000000000000000 ``` -*Note: in this example we're using us-west-1 region, but you should use the region of your VPC* +> [!NOTE] +> In this example we're using the `us-west-1` region, but you should use the region of your VPC. + +## HMC Deployment manifest generation + +Grab the following `Deployment` manifest template and save it to a file named `deployment.yaml.tpl`: + +```yaml +apiVersion: hmc.mirantis.com/v1alpha1 +kind: Deployment +metadata: + name: aws-hosted-cp +spec: + template: aws-hosted-cp + config: + vpcID: "{{.spec.network.vpc.id}}" + region: "{{.spec.region}}" + subnets: + - id: "{{(index .spec.network.subnets 0).resourceID}}" + availabilityZone: "{{(index .spec.network.subnets 0).availabilityZone}}" + amiID: ami-0bf2d31c356e4cb25 + instanceType: t3.medium + securityGroupIDs: + - "{{.status.networkStatus.securityGroups.node.id}}" +``` + +Then run the following command to create the `deployment.yaml`: + +``` +kubectl get awscluster cluster -o go-template="$(cat deployment.yaml.tpl)" > deployment.yaml +``` diff --git a/docs/dev.md b/docs/dev.md index 4112b090..7db78297 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -71,9 +71,9 @@ export KUBECONFIG=~/.kube/config > [!NOTE] > If you encounter any errors in the output of `clusterctl describe cluster` inspect the logs of the -> `cluster-api-provider-aws-controller-manager` with: +> `capa-controller-manager` with: > ``` -> kubectl logs -n hmc-system deploy/cluster-api-provider-aws-controller-manager +> kubectl logs -n hmc-system deploy/capa-controller-manager > ``` > This may help identify any potential issues with deployment of the AWS infrastructure.