Self-Serve Kubernetes Clusters in Wayfinder
To get your application running on Wayfinder, you need a cluster. A cluster represents a dedicated, isolated Kubernetes cluster available for your workspace. It can be hosted in AWS, Google Cloud, or Microsoft Azure. Once you are in a Wayfinder workspace, you can access a cluster and create one.
This topic contains information on accessing existing clusters and creating new clusters, followed by information on more advanced cluster settings.
See also: Managing Multi-tenant Clusters
CLI quick reference
This page shows how to manage clusters and namespaces, generally using the UI. Here is a quick reference to the equivalent CLI commands:
Task | Command |
---|---|
List clusters | wf get clusters |
Access a cluster | wf access cluster CLUSTER-NAME See also Access a cluster |
Create a cluster | wf create cluster CLUSTER-NAME See also Create a cluster using the CLI |
Create a namespace | wf create namespace |
Delete a cluster | wf delete cluster CLUSTER-NAME |
Delete a namespace | wf delete namespace NAMESPACE-NAME |
Access a cluster
You must assume a role to access a cluster for any purpose. Role assumption is time-limited to one hour by default. After an hour you must re-assume the role, as described below, to continue working with your cluster. For more information, see Assuming Roles.
If you have one or more clusters available to your workspace, you can get kubectl
access to them using
the wf access cluster
command.
wf access cluster
does two operations (which you can also run separately):
- Sets your
kubectl
context to access a cluster that your workspace owns—seewf kubeconfig
- Performs a role assumption to grant you temporary permissions on that cluster—see
wf assume
and Assume a Role
You can provide all details directly, or run the command with no parameters to be prompted for details.
To access a cluster:
-
Run the following command:
wf access cluster CLUSTER NAMESPACE --role ROLE
For example:
$ wf access cluster eks-dev project-namespace --role cluster.viewer
◉ Waiting for role to be applied
✔ Access to cluster eks-dev with role cluster.viewer granted until: 30 Apr 21 19:48 BST
✔ Current kubectl context set to devs.eks-dev -
Use
kubectl
to access your cluster. For example:$ kubectl get pods -n project-namespace
No resources found in project-namespace namespace.
Create a cluster
To create a cluster, you will need to have access to a cloud allocated to your workspace by your Wayfinder administrator.
Refer to the "Overview of creating a self-service cluster" section for details on how to create a cluster.
Services included in each cluster via a cluster plan.
Refer to the "Wayfinder's Default Cluster Plans" section for details on pre-provisioned services included when using Wayfinder's default cluster plans.
If you're using multi-tenant clusters
For details on multi-tenancy in Wayfinder, see Managing Multi-tenant Clusters.
Make a cluster ephemeral (temporary)
Ephemeral clusters are deleted after a set time. You can make a cluster ephemeral when creating it, or afterward.
Refer to the "Self-Service Cluster Provisioning Details" section for details on setting a cluster as long-lived or ephemeral.
Manage clusters
Namespaces
When developers create a new environment and choose to use existing infrastructure, then Wayfinder will automatically create a new namespace on an existing cluster. This will keep different environments isolated from each other when developers deploy their applications into that environment.
Edit cluster settings
To edit cluster settings in Wayfinder's web interface
- Select Admin > Kubernetes > Clusters, and then click the name of the cluster you want to edit.
- Click the Settings tab for this cluster, and then click the Edit button.
- Make your changes, and then click Save.
Manage cluster labels
Labels are key:value pairs in Kubernetes. You can use cluster labels in user access policies to constrain the policies to include/exclude clusters with specific labels.
For more information on these use cases, see:
-
Refer to the "Cluster Plan Details" section for adding labels to a cluster when provisioned.
All clusters have the internal labels which are automatically added by Wayfinder. You can use these as well as your own labels to filter clusters as needed.
Create spot/preemptible node pools
Spot or preemptible VMs provide a cost-saving way to run workloads that can tolerate interruption, because spot instances are not guaranteed to be available from the cloud provider. For example, they are appropriate for use with batch processing jobs, or fault-tolerant testing environments.
Refer to the "Compute Template NodePools" section for details about spot/preemptible node pools property and the "Self-Service Cluster Provisioning Compute Details" for instructions on how to customisable compute templates for provisioining clusters with spot/preemptible enabled.
For more information, see:
Configure cluster network settings
The network types for which you can provide IP ranges are:
Cloud | Supported network types |
---|---|
EKS | Nodes |
AKS | Nodes, Services |
GKE | Nodes, Services, Pods |
You configure the cluster network setting using a Cluster Network Plan and then add the Network Plan to a Cluster Plan.
The cluster plan along with a Compute Template is used to configure the cluster during provisioning.
The cluster network settings cannot be changed once the cluster is created.
Upgrade Kubernetes on a cluster
You can updagrade your cluster by creating a new version of a cluster plan and updating the details such as Kubernetes version.
Delete a cluster
Deleting a cluster also deletes namespaces on that cluster, including tenant namespaces if it's a multi-tenant cluster.
To delete a cluster:
Wayfinder's web interface: Go to your workspace and select Clusters. Select the cluster that you want to delete and click the Delete button.
CLI: wf delete cluster CLUSTER-NAME