Google Cloud

Setting up Cased Shell on an existing GKE cluster.

Configuring a Hostname, DNS record, and Certificate on a GKE Deployment of Cased Shell

Requirements

  • A Google Cloud Project.
  • A GKE Cluster.
  • A Google Cloud DNS zone in the same project as the GKE cluster (e.g. example.com).
  • A hostname selected in the above zone selected for use for Cased shell (e.g. shell.example.com).

Setup

Enable the HttpLoadBalancing add-on on the GKE cluster

The HttpLoadBalancing add-on is required to serve HTTPS traffic to Cased Shell users. This may be enabled already.

Authenticate, connect to your cluster

Login to the Google Cloud project containing the Google Cloud DNS Zone and the GKE cluster on which you'd like to deploy Cased Shell.
gcloud auth login
gcloud container clusters get-credentials $CLUSTER --region $REGION --project $PROJECT

Install Cased Shell

curl https://kots.io/install | bash
# optionally pass --namespace to install into a specific namespace, see --help for more options
kubectl kots install cased-shell
Once complete, visit http://127.0.0.1:8800/ and use the password output to complete setup!

Configuring VMs for access from Cased Shell

This one-liner combines gcloud compute ssh to provision an alice linux user on example-vm and a setup command that configures the user account to access to [email protected] when logged into cased.example.com
gcloud compute ssh [email protected] --command="curl https://gist.githubusercontent.com/jnewland/8d1c6a20712fe56528a48a279e2556a0/raw/67b45035ac9ddcfde5bbd70d923e6a9a701326c0/cased-me.sh | bash -s -- cased.example.com [email protected]"
Then, add a prompt entry referring to it:
queries:
- provider: static
prompt:
featured: true
hostname: ip-address-of-vm-1
username: example-user