Creating an EKS cluster

2 minute read

Cluster installation and configuration in CloudBees Jenkins X Distribution is possible through Jenkins X Boot, a command that allows users to create Kubernetes clusters without running through various commands for configuring storage, pipeline, GitOps, and other resources.

Cluster prerequisites

In order to create a cluster in CloudBees Jenkins X Distribution, you must have the following configured:

  • An Amazon Web Services (AWS) account for creating kubernetes clusters

  • Binary dependencies required by CloudBees Jenkins X Distribution, which can be installed to your local installation using the jx install command:

jx install dependencies --all
  • Access to the GitHub remote Git provider, which allows users to create organizations and multiple user accounts:

    • An Organization from which you invite existing users (in this example, the organization is called acmecorp). Create an organization by clicking the + button at the top right of the GitHub project page or through the Create an organization page.

    • A GitHub user account for creating and managing development repositories (for example acmeuser). Invite the user to your organization.

    • A bot user that automates pull request notifications and creates preview environments for quick validation and acceptance for code merging. The bot account must have a token created by your organization that authenticates the bot and allows it to perform various tasks on the repositories within your organization. In the examples, a GitHub account named acmebot is used.

Create a Kubernetes cluster

The cluster creation process on CloudBees Jenkins X Distribution (run via the command jx boot) requires performing a pre-configuration procedure to successfully complete the cluster installation process:

  1. Type the following command to initialize the cluster on your Elastic Kubernetes Service (EKS) account with a specified name, for example acmecluster1:

    jx create cluster eks --skip-installation -n acmecluster1
    1. You must be authenticated against AWS as a user/assumed role with enough permissions and have either the AWS_REGION environment variable or a default region in ~/.aws/config pointing to a valid AWS region.

    2. The program runs automatically and begins creating the cluster in your specific region using eksctl.

    3. This will deploy two CloudFormation stacks, one for the cluster itself (or control plane) and another for the nodepool, deployed as EC2 instances. These CloudFormation stacks also create all other necessary services like a VPC, subnets, and more.

Configuring DNS and TLS for jx boot

If you have a domain and a DNS Zone configured and need DNS and TLS enabled for Jenkins X on your cluster, you can configure it using jx boot and adding options to your configuration files.

From the directory where you extracted the CloudBees Jenkins X Distribution tarball archive, open the jx-requirements-eks.yml file in a text editor (such as TextEdit for macOS or gedit for Linux) and edit the ingress section at the root level.

  domain: cluster1.acmecorp.example
  externalDNS: true
  ignoreLoadBalancer: true
  namespaceSubDomain: -jx.
    email: certifiable@acmecorp.example
    enabled: true
    production: true