Creating a GKE cluster

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:

  • A Google Cloud Platform (GCP) 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 btn:[+] 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. Run jx create cluster at the command-line to initialize the cluster on your Google Kubernetes Engine (GKE) account with a specified name, for example acmecluster1:

    jx create cluster gke --skip-installation -n acmecluster1
    1. The program opens a web browser to choose the email address associated with your GCP account, then prompts you to allow the Google Cloud SDK to access your account.

    2. Back at the command-line, the jx create cluster program prompts you to choose your project from the available list.

    3. The program prompts you to choose the Zone nearest to where you would like to install your cluster. For example, if you want your cluster to serve users primarily in the east coast of the United states, you choose us-east1-b from the available list.

    4. The program runs automatically through default questions and begins creating the cluster in your specified zone.

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-gke.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
  namespaceSubDomain: -jx.
    email: certifiable@acmecorp.example
    enabled: true
    production: true