How to Install Jenkins X on an Existing Kubernetes Cluster

First released in 2018, Jenkins X was created by James Strachan, creator of the Apache Groovy language. Currently managed by CloudBees, the purpose of this tool is to be a cloud-native, Kubernetes application to support CI/CD and simplify Kubernetes deployments. With just a single Jenkins X command, an admin can create a Kubernetes cluster, install the tools necessary to manage an application, create pipelines, and deploy an application to various environments.
Jenkins X is also an extensible automation server, configured by plugins, that function as a Continuous Integration (CI) server, a Continuous Deployment (CD) hub, and automated testing.
Jenkins X (also called JX) is easily installed on an existing cloud provider (such as Amazon Elastic Container Service for Kubernetes, Google Kubernetes Engine, or Microsoft Azure Kubernetes Service). Or, if you have an on-premises Kubernetes cluster, you can also make use of Jenkins X. With the jx command, you can quickly deploy clusters locally or to remote cloud providers (such as Google Cloud Platform).
I’m going to walk you through the process of installing Jenkins X on an existing Kubernetes cluster, running on Ubuntu Server 18.04.
What You’ll Need
I’m going to demonstrate deploying a Kubernetes cluster (using Jenkins X) both locally and to Google Cloud Platform. For this you’ll need:
- A running instance of Ubuntu Server with Kubernetes installed.
- A Google Cloud Platform account.
- A user with sudo privileges.
- A network connection.
Outside of that, just a little time.
Let’s make things happen.
Installing Jenkins X
Installing Jenkins X on Ubuntu is actually quite simple. The executable binary can be downloaded from the official Jenkins X GitHub page and then moved into the proper directory. To do this, either log into your server, via SSH, or into the console directly. Once you have a bash prompt for your server, issue the command:
1 |
curl -L "https://github.com/jenkins-x/jx/releases/download/$(curl --silent "https://github.com/jenkins-x/jx/releases/latest" | sed 's#.*tag/\(.*\)\".*#\1#')/jx-linux-amd64.tar.gz" | tar xzv "jx" |
The above command will download the latest release of Jenkins X and then unpack the binary. Once the command completes, you should see an executable in the current working directory, named jx (Figure 1).

Figure 1: The jx binary, ready to be relocated.
To move the Jenkins X binary, issue the command:
1 |
sudo mv jx /usr/local/bin |
If you opt to deploy a cluster using a virtual machine environment, you’ll have to have that installed as well. For this, you can always install KVM, KVM-2, or VirtualBox. To make this easy, we’ll install VirtualBox. This does install an X server, but you don’t have to use it.
In order to install VirtualBox, issue the command:
1 |
sudo apt-get install virtualbox -y |
This installation will take some time. Let it finish. Next, you’ll want to install minikube on your Ubuntu Server (as that will be our provider). To do this, download the necessary file with the command:
1 |
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 |
Change the permission of the downloaded file with the command:
1 |
chmod +x minikube-linux-amd64 |
Move (and rename) the file into the proper directory with the command:
1 |
sudo mv minikube-linux-amd64 /usr/local/bin/minikube |
You should see that minikube is now installed with the command:
1 |
minikube version |
The output will show the release number of minikube (Figure 2).

Figure 2: Minikube is installed and ready to go.
Deploying a Cluster with the jx Command
We’re now going to deploy a cluster. The cluster will use the minikube provider and VirtualBox as the driver. The command to deploy the cluster is:
1 |
jx create cluster minikube |
You will be asked the following questions:
- Amount of memory to apply to the cluster (default is 4096).
- Number of cores to apply to the cluster (default is 3).
- Disk size (default is 150GB).
- Select driver (select from kvm, kvm2, virtualbox, none).
If you select the following options:
- Memory 4096
- Cores 3
- Disk size 20GB
- Driver virtualbox
The effective command would be:
1 |
minikube start --memory 4096 --cpus 3 --disk-size 20GB --vm-driver virtualbox --bootstrapper=kubeadm |
You can also deploy a cluster on a local environment without using a driver (selecting the none option). To do this, you must run the jx command with sudo like so:
1 |
sudo jx create cluster minikube --local-cloud-environment=true |
Effectively, the command that will be run is:
1 |
minikube start --memory 4096 --cpus 3 --disk-size 20GB --vm-driver none --bootstrapper=kubeadm |
The jx command will take care of pulling all of the necessary images and deploy the configured cluster.
Deploy to Google Cloud
Let’s say you want to deploy your cluster to the Google Cloud Platform. Jenkins X makes this possible as well. Before you do this, you must first have the gcloud application Installed. To do this, go back to your terminal window and download the source file with the command:
1 |
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-265.0.0-linux-x86_64.tar.gz |
Unpack the file with the command:
1 |
tar -zxf google-cloud-sdk-* |
Change into the newly created directory with the command:
1 |
cd google-cloud-sdk |
Finally, run the installer with the command:
1 |
./install.sh |
Once you’ve taken care of that, update all things gcloud with the command:
1 |
gcloud components update |
Finally, you must login to your Google Cloud Platform account with the command:
1 |
gcloud auth login |
A link will print out. Open that link in a browser, select the Google account you wish to use, and then copy the verification code you are given. Paste that code into the command prompt and hit Enter. You are now logged into your Google Cloud Platform account and can issue the command:
1 |
jx create cluster gke --skip-login |
When prompted, make sure you select the Google Cloud Project you wish to use (Figure 3).

Figure 3: Selecting a Google Cloud Project.
Once you’ve made your selection and hit Enter, you’ll be prompted to select a zone (Figure 4).

Figure 4: Selecting a zone for your cluster.
Next, you’ll be asked the Jenkins installation type (choose from Serverless Jenkins X Pipelines with Tekton or Static Jenks Server with Jenkinsfiles). Do note, when using tekton, only kaniko is supported as a builder.
You’ll then have to enter a name and email address to use with git and then acquire the necessary API key for your GitHub account. That’s it. The cluster will deploy and is ready to work for you.
And that’s the gist of installing and using Jenkins X on an existing Kubernetes Cluster. There’s so much more that this tool can do, so I highly recommend combing through the official documentation.