To create a new Kubernetes cluster with Jenkins X installed use the jx create cluster command.
A number of different public cloud providers are supported as shown below.
For the best getting started experience we currently recommend using Google Container Engine (GKE). The Google Cloud Platform offers a $300 free credit if you don’t have a Google Cloud account. See https://console.cloud.google.com/freetrial
Here’s a little demo showing GKE, AKS and Minikube in parallel. It can take some time to start on different machines/clouds so please be patient!
We support both kops or eks to create your Kubernetes cluster with Jenkins X where EKS is the most strategic direction; increasingly AWS will manage more of the kubernetes side for you with EKS.
On AWS the ideal setup is to use a Route 53 DNS wildcard CNAME to point *.somedomain at your ELB or NLB host name; then when prompted by jx you install somedomain (where somedomain is an actual DNS domain/subdomain you own).
Then all the Ingress resources for any exposed service in any namespace will appear as mysvc.myns.somedomain - whether for things like Jenkins or Nexus or for your own microservices or Preview Environments.
Using wildcard DNS pointing to your ELB/NLB also means you’ll be able to use all the availability zones on AWS.
The jx command will ask you if you want to automate the setup fo the Route 53 wildcard CNAME. If you want to do it yourself you need to point to the ELB host name defined via:
kubectl get service -n kube-system jxing-nginx-ingress-controller -oyaml | grep hostname
If you want to kick the tires of Jenkins X without going to the trouble of getting a DNS domain name to use and setting up wildcard DNS you can instead use an NLP and use one of the IP addresses of one of the availability zones as your domain via $IP.ip.
This is not really intended for real production installations; but can be a quick way to get started trying out Jenkins X.
When using jx create cluster aws, jx create cluster eks or jx install --provider=(aws|eks) you are prompted if you want to use DNS and optionally setup a wildcard DNS CNAME record on Route 53; if not we are assuming you’re gonna avoid DNS to kick the tires on a single availability zone IP address by resolving the NLB host name to one of the availability zone IP addresses.
Some folks have trouble getting minikube to work for a variety of reasons:
minikube requires up to date virtualisation software to be installed and your machine
you may have an old Docker installation or old minikube / kubectl or helm binaries and so forth.
So we highly recommend using one of the public clouds above to try out Jenkins X. They all have free tiers so it should not cost you any significant cash and it’ll give you a chance to try out the cloud.
If you still want to try minikube then we recommend letting jx create the cluster for you (as opposed to installing jx into an existing minikube cluster) by running:
jx create cluster minikube
You’ll be prompted for the amount of memory, cores, and disk size to use, and also the driver.
A known good configuration on a 2015 model Macbook Pro is to use 8 GB of RAM, 8 cores*, a 150 GB disk size and hyperkit. For installing hyperkit, see the hyperkit installation documentation.
The disk size is particularly large as a number of images will need to be downloaded. These are used by jx and here are the sizes at the time of this document:
“I get Error creating cluster exit status 1, or it seems to be hanging - what should I do?”
Check to see if minikube status reports that minikube is actually already running. If it is, do minikube stop and then repeat the cluster creation process. Removing your ~/.minikube directory is also known to help: you want to make sure you have a clean environment with a working driver installed before attemping to run jx create cluster minikube.
The cluster role binding may exist through your use of Minikube before with RBAC. Delete any existing cluster role binding with the above name (kubectl delete clusterrolebinding add-on-cluster-admin) and then repeat the jx create cluster minikube command.
If the above proceeds OK, you’ll be greeted with Please enter the name you wish to use with git:.
you can specify more cores than you actually have!