Deploy vCluster Platform on Amazon EKS
This guide provides instructions for deploying the platform on Amazon Elastic Kubernetes Service (EKS).
Prerequisites​
Ensure you have the following:
-
Administrator access to a Kubernetes cluster: See Accessing Clusters with kubectl for more information. Your current kube-context must have administrative privileges, which you can verify with
kubectl auth can-i create clusterrole -A
infoTo obtain a kube-context with admin access, ensure you have the necessary credentials and permissions for your Kubernetes cluster. This typically involves using
kubectl config
commands or authenticating through your cloud provider's CLI tools. -
helm
installed: Helm v3.10 is required for deploying the platform. Refer to the Helm Installation Guide if you need to install it. -
kubectl
installed: Kubernetes command-line tool for interacting with the cluster. See Install and Set Up kubectl for installation instructions.
- vCluster CLI installed:
- Homebrew
- Mac (Intel/AMD)
- Mac (Silicon/ARM)
- Linux (AMD)
- Linux (ARM)
- Download Binary
- Windows Powershell
brew install loft-sh/tap/vcluster
The binaries in the tap are signed using the Sigstore framework for enhanced security.
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-darwin-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-darwin-arm64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-arm64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster
Download the binary for your platform from the GitHub Releases page and add this binary to your $PATH.
md -Force "$Env:APPDATA\vcluster"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-windows-amd64.exe" -o $Env:APPDATA\vcluster\vcluster.exe;
$env:Path += ";" + $Env:APPDATA + "\vcluster";
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);Reboot RequiredYou may need to reboot your computer to use the CLI due to changes to the PATH variable (see below).
Check Environment Variable $PATHLine 4 of this install script adds the install directory
%APPDATA%\vcluster
to the$PATH
environment variable. This is only effective for the current Powershell session, i.e. when opening a new terminal window,vcluster
may not be found.Make sure to add the folder
%APPDATA%\vcluster
to thePATH
environment variable after installing vcluster CLI via Powershell. Afterward, a reboot might be necessary.Confirm that you've installed the correct version of the vCluster CLI.
vcluster --version
AWS CLI
installed: Command-line tool for interacting with Amazon Web Services (AWS) resources and services. For more details on installation, see the AWS CLI user guide.eksctl
: Command-line utility that simplifies creating and managing Kubernetes clusters on Amazon Elastic Kubernetes Service (EKS). For more details on installation, see the eksctl documentation.
Ensure you have the necessary IAM permissions to create clusters and manage cloud services.
Create an AWS EKS cluster​
Configure the AWS CLI.
Run the following command and provide your AWS Access Key ID, Secret Access Key, and preferred output format when prompted:
Configure AWS CLIaws configure
This sets up local credentials in
~/.aws/credentials
and stores your default region and output format in~/.aws/config
. This enables the AWS CLI and tools like eksctl to authenticate and access AWS services.Set environment variables.
Modify the following with your specific values to generate a copyable command:export CLUSTER_NAME=vcluster-demo
export REGION=eu-central-1Create an AWS EKS cluster using the
eksctl
CLI:Modify the following with your specific values to generate a copyable command:eksctl create cluster \
-name=vcluster-demo \
--enable-auto-mode \
--region=eu-central-1infoThis process typically takes about 10-15 minutes.
This command creates an AWS EKS cluster named
vcluster-demo
in the regioneu-central-1
.kubeconfig updateThis command automatically updates your
kubeconfig
file with the new cluster configuration.Verify the cluster creation.
Verify that the AWS EKS was created successfully by getting the cluster info:
List cluster nodeskubectl cluster-info
You should see an output similar to the following:
Example outputKubernetes control plane is running at https://8F3D76A1C205B94E32D18FC96E04B73D.gr7.eu-central-1.eks.amazonaws.com
Set up the platform​
After the AWS EKS cluster is running, deploy the platform.
Install the platform​
Deploy the platform using the vCluster CLI:
idempotencyThe following command is idempotent, meaning that running it again does not result it creating another cluster with the same name.
vcluster platform start
The command prompts you to enter the email address for the admin user:
deployment expected outputBy providing your email, you accept our Terms of Service and Privacy Statement:
Terms of Service: https://www.loft.sh/legal/terms
Privacy Statement: https://www.loft.sh/legal/privacy
? Please specify an email address for the admin usertipIf the command takes too long to execute—such as when other cluster operations are in progress—rerun the command.
Connect to the platform.
After the platform is deployed, your default browser opens with the platform UI, and you should see output similar to the following:
platform deployment output########################## LOGIN ############################
Username: admin
Password: 9758c908-b931-4edd-b3cb-3f034e50651a # Change via UI or via: vcluster platform reset password
Login via UI: https://hyx4907.loft.host
Login via CLI: vcluster platform login https://hyx4907.loft.host
#################################################################
vCluster Platform was successfully installed and can now be reached at: https://hyx4907.loft.host
Thanks for using vCluster platform!
19:34:46 done You are successfully logged into vCluster Platform!
- Use `vcluster platform create vcluster` to create a new virtual cluster
- Use `vcluster platform add vcluster` to add an existing virtual cluster to a vCluster platform instanceWhen logging in via the UI, provide the following details:
- First Name
- Last Name
- Email (pre-filled with the address you supplied earlier)
- Organization
To log in via the CLI, run the
Login via CLI
command provided above.This completes the basic platform deployment. For additional configuration and available features, see the Next steps section.
You can optionally perform additional configuration steps:
Expose platform UI using the load balancer​
Optionally, you can expose the platform UI using a LoadBalancer service to make it accessible outside the cluster.
Create a LoadBalancer service to expose the platform UI.
noteThis assumes the platform is deployed in the
vcluster-platform
namespace which is a default deployment namespace.cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: vcluster-platform-loadbalancer
namespace: vcluster-platform
spec:
type: LoadBalancer
externalTrafficPolicy: Cluster
selector:
app: loft
ports:
- name: https
protocol: TCP
port: 443
targetPort: 10443
EOFAfter the service is active, obtain the external IP address:
kubectl get svc vcluster-platform-loadbalancer -n vcluster-platform
Navigate to the IP address in your browser
https://<EXTERNAL_IP>
.tipThe platform uses a self-signed certificate, so you must accept the warning in your browser. For production use, replace the default self-signed certificate with a valid TLS certificate.
Set up custom domain and configure DNS​
Optionally, you can set up a custom domain and configure DNS to provide a secure URL for accessing the platform.
This example assumes that your cluster has the AWS Load Balancer Controller installed. You must also have an SSL/TLS certificate issued by AWS Certificate Manager (ACM) that is created and verified.
Configure DNS in Amazon Route 53. To use a custom domain, you must create a new Route 53 hosted zone:
Modify the following with your specific values to generate a copyable command:aws route53 create-hosted-zone \
--name=vcluster-platform.yourdomain.tld \
--caller-reference=vcluster-demoDeploy the
external-dns
EKS add-on.This add-on automatically manages DNS records based on Kubernetes resources such as
Ingress
andService
. It integrates with Route 53 and eliminates the need to manually create or update DNS entries.Modify the following with your specific values to generate a copyable command:eksctl create addon \
--name=external-dns \
--cluster=vcluster-demo \
--auto-apply-pod-identity-associationsCreate an
Ingress
object. Replacearn:aws:acm:region:account-id:certificate/certificate-id
with the correct value of the ACM certificate Amazon Resource Name (ARN).Modify the following with your specific values to generate a copyable command:cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vcluster-platform-ingress
namespace: vcluster-platform
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:region:account-id:certificate/certificate-id
external-dns.alpha.kubernetes.io/hostname: vcluster-platform.yourdomain.tld
alb.ingress.kubernetes.io/group.name: vcluster-platform
alb.ingress.kubernetes.io/healthcheck-path: /healthz
spec:
rules:
- host: vcluster-platform.yourdomain.tld
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: loft
port:
number: 10443
EOFConnect the platform to the custom domain.
After the DNS is setup, start the platform with the following command:
vcluster platform start --host=vcluster-platform.yourdomain.tld
infoFor more information on how to configure a custom domain, see the Configure external acess and TLS documentation.
If you do not have a custom domain setup, follow the Set up a domain by using Cloud DNS tutorial.
Next steps​
After logging into the UI, you'll be able to start creating virtual clusters immediately. You're automatically part of a project called Default Project
.
Click New Virtual Cluster and Create to spin one up to try out.
Find more information about creating virtual clusters in the create virtual clusters section.
Otherwise, read more about some primary concepts:
- Projects - How resources can be grouped together into different projects.
- Virtual clusters - How to create and manage virtual clusters.
- Templates - How to use templates to control what type of resources that can be made.
- Host clusters - How to add more host clusters to the platform.
- Sleep and wakeup - How to temporarily scale down unused virtual clusters and bring them back up.
You can also use Google as an identity provider and configure SSO to enable user authentication to the platform.
Cleanup​
If you deployed the AWS EKS cluster with this tutorial, and want to clean up the resources, run the following command:
eksctl delete cluster -n $CLUSTER_NAME
Remember to clean up the ACM certificate and Route 53 hosted zone if they are no longer needed.