What you’ll need
- A Palette account with Spectro Cloud.
- An ngrok account.
- An account with privileges to create a cluster on one of the providers Palette supports, such as Amazon EKS, Azure AKS, or Google GKE.
- A reserved domain from the ngrok dashboard or API; this guide refers to it as
NGROK_DOMAIN.
1. Create a cluster profile in Palette
Palette uses an infrastructure cluster profile to define the base layers of a Kubernetes cluster: the OS, Kubernetes version, network, and storage packs. If you already have a cluster profile, skip to Create your cluster with Palette. If you already have a functioning cluster in Palette, skip to Create an add-on cluster profile for an example app. Follow Palette’s Create Cluster Profiles documentation to create aFull infrastructure profile for your chosen cloud provider, leaving the pack defaults in place.
2. Create an add-on cluster profile for the ngrok Kubernetes Operator
Your infrastructure profile defines the cluster’s base layers, but not a way to handle ingress. Palette ships a ready-to-apply pack for the ngrok Kubernetes Operator, the official controller for adding public and secure ingress to your Kubernetes services. Create a newAdd-on cluster profile and add the ngrok Kubernetes Operator pack from the Ingress section of the pack registry.
See Palette’s docs on add-on profiles for the steps.
In the pack’s YAML, find the credentials block and set apiKey and authtoken to the values from your ngrok account:
apiKey.
Find your authtoken under Your Authtoken and copy it into authtoken.
Palette hides these values after you enter them.
Save the pack to add the layer to your profile.
3. Create an add-on cluster profile for an example app
This section deploys thetinyllama demo app and an Ingress that tells the ngrok Kubernetes Operator to route your reserved domain to it.
Create another Add-on cluster profile named tinyllama.
Add a manifest layer, then add the deployment and service manifests below.
See Palette’s docs on adding a manifest to a profile for the steps.
Deployment manifest:
showLineNumbers
showLineNumbers
Ingress manifest, replacing NGROK_DOMAIN with the domain you reserved:
showLineNumbers
4. Create your cluster with Palette
You can now create the cluster and attach the profiles you built. Follow Palette’s Creating Clusters documentation for your provider (see Public Cloud Clusters for EKS, AKS, and GKE). When Palette prompts you for cluster profiles, select the infrastructure profile from step 1, then attach the ngrok Kubernetes Operator andtinyllama add-on profiles.
Deployment can take several minutes depending on your profile, node pool, and region.
Once Palette reports the cluster as Running, open your NGROK_DOMAIN in a browser.
ngrok routes requests to the ngrok Kubernetes Operator, which forwards them to the tinyllama service.
What’s next?
You’ve used Spectro Cloud’s Palette to build declarative cluster profiles and deploy an app with public ingress through the ngrok Kubernetes Operator. You can follow the same process to expose your own apps by swapping the manifests in step 3.Clean up
Delete the cluster from its Overview in Palette. Palette sends the requests to your cloud provider to remove the cluster resources, and ngrok deletes the endpoint when the cluster goes away.Extend your ngrok Kubernetes Operator and Palette integration
Read the Kubernetes Operator docs for more detail, including how it works and how to apply anNgrokTrafficPolicy resource to your Ingress to start using the Traffic Policy system.