Skip to content

Cluster Configuration

Configuring your target Kubernetes cluster is a critical first step. The tntc CLI does not access the Kubernetes API directly — all cluster operations route through the MCP server. Configuration tells the CLI where to find the MCP server and how to authenticate.

  • tntc CLI installed
  • A Kubernetes cluster with the MCP server installed
  • kubectl access (for initial MCP server setup only)

Configuration lives in two locations:

FileScopePurpose
~/.tentacular/config.yamlUser-levelGlobal defaults, shared across all projects
.tentacular/config.yamlProject-levelPer-project overrides (in your workspace)

Resolution order: CLI flags > project config > user config > defaults.

Terminal window
# Set user-level defaults
tntc configure --registry ghcr.io/yourorg --default-namespace tentacular-dev
# Or set project-level defaults
tntc configure --registry ghcr.io/yourorg --default-namespace tentacular-dev --project

Edit ~/.tentacular/config.yaml (or .tentacular/config.yaml) to define your environments:

registry: ghcr.io/yourorg
namespace: default
runtime_class: gvisor
default_env: dev
environments:
dev:
kubeconfig: ~/dev-secrets/kubeconfigs/dev-cluster.kubeconfig
namespace: tentacular-dev
image: ghcr.io/yourorg/tentacular-engine:latest
runtime_class: gvisor
mcp_endpoint: http://172.31.29.1:30080/mcp
mcp_token_path: ~/.tentacular/mcp-token
staging:
kubeconfig: ~/dev-secrets/kubeconfigs/staging.kubeconfig
namespace: tentacular-staging
image: ghcr.io/yourorg/tentacular-engine:latest
runtime_class: gvisor
mcp_endpoint: http://staging-mcp.example.com:30080/mcp
mcp_token_path: ~/.tentacular/mcp-token-staging
prod:
kubeconfig: ~/dev-secrets/kubeconfigs/prod.kubeconfig
namespace: tentacular-prod
image: ghcr.io/yourorg/tentacular-engine:latest
runtime_class: gvisor
mcp_endpoint: http://prod-mcp.internal:30080/mcp
oidc_issuer: https://keycloak.example.com/realms/tentacular
oidc_client_id: tentacular-mcp
oidc_client_secret: your-client-secret
catalog:
url: https://raw.githubusercontent.com/randybias/tentacular-scaffolds/main
cacheTTL: 1h

Bearer token (default):

Terminal window
# Save the token generated during MCP server installation
echo "your-mcp-token" > ~/.tentacular/mcp-token
chmod 600 ~/.tentacular/mcp-token

OIDC/SSO (recommended for production):

When oidc_issuer, oidc_client_id, and oidc_client_secret are configured for an environment:

Terminal window
# Authenticate via browser-based OIDC flow
tntc login --env prod
# Verify identity
tntc whoami --env prod
# Clear credentials
tntc logout --env prod

The CLI uses the OAuth 2.0 Device Authorization Grant — it displays a code, you authenticate in your browser, and the CLI polls until complete. Tokens are cached at ~/.tentacular/tokens/<env>.json with restricted permissions (0600) and refresh automatically.

All auth methods can coexist — OIDC is tried first, bearer token is the fallback. OIDC enables deployer provenance tracking (who deployed what, when).

Claude Code OAuth:

If using Claude Code as an MCP client, configure .mcp.json in your workspace root:

{
"mcpServers": {
"tentacular-mcp": {
"type": "http",
"url": "http://<mcp-endpoint>/mcp",
"oauth": { "clientId": "tentacular-mcp" }
}
}
}

When the MCP server has externalURL configured, Claude Code auto-discovers the authorization server via RFC 9728. On first connection, a browser opens for Keycloak login. Tokens are stored in the system keychain and refreshed automatically. See the MCP Server Setup guide for details.

Terminal window
# Check cluster connectivity
tntc cluster check --env dev
# Generate a cluster capability profile
tntc cluster profile --env dev --save
# Profile all environments
tntc cluster profile --all --save
FieldTypeDefaultDescription
workspacestring~/tentaclesDefault workspace directory for tentacle projects
registrystringContainer registry URL for tntc build --push
namespacestringdefaultDefault Kubernetes namespace
runtime_classstringgvisorDefault RuntimeClass (empty disables gVisor)
default_envstringEnvironment used when --env is not specified
FieldTypeDescription
kubeconfigstringPath to kubeconfig file (supports ~ expansion)
contextstringkubectl context name within the kubeconfig
namespacestringK8s namespace override for this environment
imagestringEngine container image
runtime_classstringRuntimeClass override
mcp_endpointstringFull URL to MCP server /mcp path
mcp_token_pathstringPath to bearer token file (supports ~)
oidc_issuerstringOIDC provider issuer URL (e.g., Keycloak realm)
oidc_client_idstringOIDC client ID
oidc_client_secretstringOIDC client secret
config_overridesmapKey-value pairs merged into workflow config at deploy time
secrets_sourcestringSecrets backend (default: local $shared references)
enforcementstringContract enforcement mode: strict (default) or audit
  1. Active environment’s mcp_endpoint / mcp_token_path (from --env > TENTACULAR_ENV > default_env)
  2. TNTC_MCP_ENDPOINT / TNTC_MCP_TOKEN environment variables
  1. CLI -n flag
  2. workflow.yaml deployment.namespace
  3. Active environment’s namespace
  4. Top-level namespace
  5. default
  • tntc cluster check passes all checks
  • tntc cluster profile returns cluster capabilities
  • tntc whoami shows authenticated identity (if using OIDC)
  • tntc list --env <name> shows deployed tentacles (may be empty initially)
SymptomCauseFix
MCP not configuredMissing mcp_endpointAdd mcp_endpoint to the active environment
connection refusedWrong MCP endpoint URLVerify the MCP server is running and the URL is correct
401 UnauthorizedWrong or expired tokenRegenerate the bearer token or run tntc login
OIDC flow timeoutBrowser not openingCopy the URL manually and authenticate
invalid_scope in Claude CodeKeycloak client missing scopesAdd all discovery scopes as optional client scopes on the Keycloak client
Claude Code Authentication ErrorMCP server not advertising authSet externalURL in Helm values, or add authServerMetadataUrl to .mcp.json oauth config
environment not foundTypo in --envCheck environment names in config file