Skip to main content
Version: 1.17

Amazon Elastic Kubernetes Service (EKS)

This guide will show you how to install Okteto onto Amazon Elastic Kubernetes Service (EKS).

Installation Requirements

In order to fully install Okteto, you'll need the following:

  • An Okteto License
  • A Kubernetes cluster
  • A domain and the ability to create wildcard DNS records for it
  • A working installation of kubectl
  • Amazon EBS CSI storage driver installed in your Kubernetes cluster
  • A working installation of Helm v3 (v3.8 or higher)

Getting your Okteto License

A license is mandatory to use Okteto. You'll receive a license key as part of your subscription to Okteto. If you haven't received it, please open a support ticket.

If you are interested in evaluating Okteto, sign up for our free 30 days trial. No credit card required.

Deploy a Kubernetes cluster

We recommend that you follow Amazon's cluster creation guide.

Okteto supports Kubernetes versions 1.25 through 1.28.

We recommend the following specs:

  • v1.28
  • A pool with at least 3 m5.xlarge nodes
  • 250 GB per disk

Amazon Linux 2 is the recommended AMI for the nodes. To obtain the ID for an Amazon Linux 2 EKS-compatible AMI, use the following command (replace $K8S_VERSION and $AWS_REGION with the desired Kubernetes version and AWS region, respectively):

aws ssm get-parameter \
--name /aws/service/eks/optimized-ami/$K8S_VERSION/amazon-linux-2/recommended/image_id \
--region $AWS_REGION \
--query 'Parameter.Value' \
--output text

Our installation guides assume Okteto will be running in a dedicated cluster. We recommend contacting our team if you plan on installing Okteto in a cluster with other workloads.

Domain

You'll need sufficient access to a subdomain to add a wildcard DNS record, such as dev.example.com. By default, all endpoints created by Okteto for your development environments will be exposed on the wildcard subdomain you choose.

This guide assumes your domain is registered in Amazon Route53 service. You can use any DNS service you prefer, but this guide focuses specifically on Amazon Route53.

Installing kubectl

Follow Amazon's documentation for installing kubectl. Once installed, configure kubectl to talk to your new cluster.

Install the Amazon EBS CSI storage driver

Install the Amazon EBS CSI storage driver as an EKS add-on so that your cluster knows how to provision storage. Follow the official documentation here.

Verify that your storage driver has been installed and is running correctly:

kubectl get pods -n kube-system | grep ebs-csi

Installing Helm v3 (v3.8 or higher)

Follow the official documentation for installing the latest release of Helm v3 (v3.8 or higher).

Installing Okteto

Adding the Okteto Helm repository

You'll need to add the Okteto repository to be able to install Okteto:

helm repo add okteto https://charts.okteto.com
helm repo update

Configuring your Okteto instance

In order to install Okteto you need to first create a config.yaml for the installation process. This file requires two things:

  • Your Okteto license
  • A subdomain

For example:

license: 1234567890ABCD==
subdomain: dev.example.com

ingress-nginx:
controller:
service:
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: nlb

buildkit:
persistence:
enabled: true

registry:
storage:
filesystem:
persistence:
enabled: true

Note: This is a very basic configuration. Learn more about the rest of the configuration options here.

The service.beta.kubernetes.io/aws-load-balancer-type: nlb annotation is used to tell AWS to create a Network Load Balancer (NLB) instead of the default Classic Load Balancer to expose the ingress controller. We recommend to use a NLB as it provides benefits like: websocket support, static IPs, and better performance. You can see a full comparison between the load balancers here.

Installing your Okteto instance

Install the latest version of Okteto by running:

helm install okteto okteto/okteto -f config.yaml --namespace=okteto --create-namespace

You can also install a specific version by including the --version argument.

After a few seconds, all the resources will be created. The output will look something like this:

Release "okteto" has been installed. Happy Helming!
NAME: okteto
LAST DEPLOYED: Thu Mar 26 18:07:55 2020
NAMESPACE: okteto
STATUS: deployed

Retrieve the Ingress Controller IP address

You can use kubectl to fetch the address that has been dynamically allocated by EKS to the NGINX Ingress we've just installed and configured as a part of Okteto:

kubectl get service -l=app.kubernetes.io/name=ingress-nginx,app.kubernetes.io/component=controller --namespace=okteto

The output will look something like this:

NAME                             TYPE           CLUSTER-IP   EXTERNAL-IP                          PORT(S)                                     AGE
okteto-ingress-nginx-controller LoadBalancer 10.0.7.73 a519c8b3b27f94...elb.amazonaws.com 80:30795/TCP,443:32481/TCP,1234:30885/TCP 5m

You'll need to take the EXTERNAL-IP address, and add it to your DNS for the domain you have chosen to use. In Route 53, this is done by creating an A record with the name *, pointing to the alias of the Elastic Load Balancer.

Note: avoid using a CNAME record for * pointing to the public hostname of the Elastic Load Balancer, as it will block the cert-manager default capability for issuing/renewing certificates via ACME dns01.

Sign in to your Okteto instance

After a successful installation, you can access your Okteto instance at https://okteto.SUBDOMAIN. Your account will be automatically created as part of the login process. The first user to successfully login into the instance will be automatically assigned the administrator role.

Important: The default installation is not recommended for production use. We highly advise following the steps outlined in the Admin Dashboard after finishing your trial and giving your team access to your Okteto instance.

Next we're going to install and configure the Okteto CLI with your Okteto instance.