Skip to main content
Version: Develop

Setting Up an App Cluster

Connecting an App Cluster to the Klutch Control Plane establishes the secure link required for developers to provision and manage data services. This process, called API binding, makes the Klutch APIs available to the App Cluster so developers can request and consume data services. It also installs the local synchronization agent and authenticates the App Cluster with the Control Plane's OIDC service to establish the required secure communication between the two clusters.

Prerequisites

Before proceeding with the binding process, ensure the following requirements are met:

  • Control Plane Setup: A fully operational Control Plane Cluster with at least one connected Automation Backend.
  • Kubernetes Cluster: A running Kubernetes cluster designated for consuming data services.
  • Network Connectivity: The App Cluster must be able to reach the Control Plane Cluster.
  • Authentication: Valid OIDC credentials corresponding to your binding workflow:
    • Interactive Binding: No local OIDC credentials required. Authentication is handled by the klutch-bind backend via your browser.
    • Non-Interactive Binding (CI/CD): Requires a dedicated Client ID and Client Secret for a Machine-to-Machine (M2M) OIDC client.
      • ⚠️ Warning: Do not reuse the Client ID created for the klutch-bind backend; browser-only clients are incompatible with automation flows.
      • Example: For a walkthrough using Keycloak, see the Keycloak CLI Client Guide.
  • Tools:
Security Best Practice

An App Cluster stores sensitive information (such as Service Binding credentials) in Kubernetes Secrets.

Enable Encryption at Rest on this cluster to ensure data security.

Binding the App Cluster

Select the binding workflow that best fits your environment: Interactive (browser-assisted) or Non-Interactive (automation-friendly).

1. Install kubectl-bind CLI

The kubectl-bind plugin is required for the interactive, web-based cluster binding process.

A. Download Binary (v1.5.0)

ArchitectureDownload Link
amd64amd64
arm64arm64

B. Installation Steps (Mac/Linux)

Follow these steps for Mac or Linux to install the downloaded binary. For Windows, follow the procedure for adding the binary's directory to the System PATH.

# I. Create installation directory
mkdir -p <installation-directory>/bin

# II. Copy the downloaded binary from section A and rename to kubectl-bind
cp ./<DOWNLOADED-BINARY-NAME> <installation-directory>/bin/kubectl-bind

# III. Make executable
chmod +x <installation-directory>/bin/kubectl-bind

# IV. Add to PATH (add this line to your shell profile, e.g., .bashrc or .zshrc)
export PATH=$PATH:<installation-directory>/bin

Verification:

The following command should output usage information:

kubectl bind --help

2. Execute Interactive Binding

A. Execute Binding Command

Execute the command below, replacing <backend-host> with the public hostname of the Klutch Control Plane.

kubectl bind https://<backend-host>:443/export --konnector-image=public.ecr.aws/w5n9a2g2/anynines/konnector:v1.5.0

B. Authenticate and Complete Binding

This command will trigger the following interactive steps:

  1. A web browser window will open, prompting authentication via your OIDC provider.
  2. After successfully logging in and granting access, confirm in the terminal (respond Yes).
  3. The konnector deployment is automatically installed on the App Cluster.
  4. The Klutch web UI will open, allowing the selection of service APIs to bind.

Once authentication is complete, the available services can be selected using the Klutch web UI:

Bind an a9s Data Service using the web UI

Binding Multiple Services

The API binding process must be completed one service at a time. If binding multiple services (e.g., PostgreSQL, S3), the kubectl bind command and OIDC login must be repeated for each service.

Manual Konnector Deployment

When provisioning App Clusters from automated CI flows, it may be desirable to avoid the kubectl-bind and helper CLI dependencies. For these scenarios, the Konnector component can be deployed using a plain Kubernetes manifest. Note that this step only installs the Konnector and does not complete the binding. See the dedicated guide for manifest and binding details: Manual Konnector Deployment

Next Steps

With the App Cluster successfully bound, developers can immediately start provisioning configured data services using their usual Kubernetes workflow (creating a service claim Custom Resource).