Create a new AWS Kubernetes cluster in an existing infrastructure
When you use existing infrastructure, DKP does not create, modify, or delete the following AWS resources:
- Internet Gateways
- NAT Gateways
- Routing tables
- Subnets
- VPC
- VPC Endpoints (for subnets without NAT Gateways)
-
Set the environment variable to the name you assigned this cluster:
See Get Started with AWS for information on naming your cluster.
-
Export variables for the existing infrastructure details:
AWS_VPC_ID
: the VPC ID where the cluster will be created. The VPC requires theec2
,elasticloadbalancing
,secretsmanager
andautoscaling
VPC endpoints to be already present.AWS_SUBNET_IDS
: a comma-separated list of one or more private Subnet IDs with each one in a different Availability Zone. The cluster control-plane and worker nodes will automatically be spread across these Subnets.AWS_ADDITIONAL_SECURITY_GROUPS
: a comma-seperated list of one or more Security Groups IDs to use in addition to the ones automatically created by CAPA.AWS_AMI_ID
: the AMI ID to use for control-plane and worker nodes. The AMI must be created by the konvoy-image-builder project as described on the previous page.
The tags should be set as follows, where
<CLUSTER_NAME>
corresponds to the name set inCLUSTER_NAME
environment variable: -
Configure your cluster to use an existing Docker registry as a mirror when attempting to pull images:
DOCKER_REGISTRY_URL
: the address of an existing Docker registry accessible in the VPC that the new cluster nodes will be configured to use a mirror registry when pulling images.DOCKER_REGISTRY_CA
: (optional) the path on the bastion machine to the Docker registry CA. Konvoy will configure the cluster nodes to trust this CA. This value is only needed if the registry is using a self-signed certificate and the AMIs are not already configured to trust this CA.DOCKER_REGISTRY_USERNAME
: optional, set to a user that has pull access to this registry.DOCKER_REGISTRY_PASSWORD
: optional if username is not set.
-
Create a Kubernetes cluster:
-
(Optional) The Control Plane and Worker nodes can be configured to use an HTTP proxy:
- Replace
example.org,example.com,example.net
with you internal addresses localhost
and127.0.0.1
addresses should not use the proxy10.96.0.0/12
is the default Kubernetes service subnet192.168.0.0/16
is the default Kubernetes pod subnetkubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster,kubernetes.default.svc.cluster.local
is the internal Kubernetes kube-apiserver service.svc,.svc.cluster,.svc.cluster.local
is the internal Kubernetes services169.254.169.254
is the AWS metadata server.elb.amazonaws.com
is for the worker nodes to allow them to communicate directly to the kube-apiserver ELB
- Replace
-
(Optional) Create a Kubernetes cluster with HTTP proxy configured. This step assumes you did not already create a cluster in the previous steps:
-
Inspect the created cluster resources:
-
Wait for the cluster control-plane to be ready:
Then, explore your new cluster.