We're going to overview the entire process of installing a new Deis cluster on an existing Kubernetes cluster, creating and configuring your app, deploying code, and scaling up.
- A working Kubernetes cluster on Google Container Engine (Deis, of course, works anywhere Kubernetes can be installed, but the installation instructions in step 1 are tailored to GKE)
- The Kubernetes client CLI (
kubectl
) installed on thePATH
, and configured to talk to the aforementioned cluster - An alias called
kd
tokubectl --namespace=deis
(alias kd="kubectl --namespace=deis"
will create it in most shells). This alias will be useful since the Helm Deis chart installs all of the components into thedeis
namespace - The Helm CLI installed on the
PATH
. Helm is our open source Kubernetes package manager. Find it at https://github.com/helm/helm - Ensure you have no installed Helm repository called
deis
(helm repo remove deis
if you do) - Ensure no
deis
Kubernetes namespace, or any existing app namespaces - Ensure no Deis cluster installed (
helm uninstall deis
if there is one)
helm repo add deis https://github.com/deis/charts.git
- to tell Helm about the chart for Deishelm fetch deis/deis
- to copy the updated Deis chart into Helm's working directoryhelm install deis
- to install Deis onto your Kubernetes clusterkd get pod
- to ensure all Deis components are up (in theRunning
Status). Rerun this command until they all are. It's normal to see some components inCrashLoopBackOff
at firstkd describe svc deis-router
- to ensure that the cloud load balancer was created
We're going to register, create an app and deploy example-go (a buildpack app) to it. Before doing these steps, make sure you have that repository checked out and are cd
-ed into it.
kd describe svc deis-router
- to get the ingress IP. Look for theLoadBalancer Ingress
field, and set it toINGRESS_IP
deis register deis.$INGRESS_IP.xip.io
- to register yourself as the first user. Sidenote: xip.io is a handy, free DNS service for this kind of testingdeis create mytest
- to create my new app. Note that this command tries to create a new git remote calleddeis
that points toINGRESS_IP
. If you already had a remote calleddeis
, that part will fail but the app will still be created. The error message will say what the remote should be, so simply rungit remote set-url deis <ERR_MSG_URL>
to correct the issue
deis keys:add ~/.ssh/id_rsa.pub
- to add my public key to the platform before the first pushgit push deis master
- to send code to Deis for build and release
curl mytest.$INGRESS_IP.xip.io
- to ensure the app is up and runningdeis scale web=3 -a mytest
- to scale up the appcurl mytest.$INGRESS_IP.xip.io
- to see that more than 1 server can server your request