Tyk Governance follows a cloud-hosted service model with customer-deployed agents, creating a secure and flexible architecture that respects your network boundaries while providing centralized governance.
For environments where you need to install agents manually (non-Tyk platforms or on-premises deployments), follow these steps:Prerequisites for Agent Installation:
Access to the Governance Hub to generate agent tokens
Network connectivity between the agent and both the Governance Hub and your API provider
Docker or Kubernetes for container-based deployment (recommended)
Create a configuration file named agent-config.yaml with the following structure:
Copy
Ask AI
#==============================================================================# Tyk Governance Agent Configuration#==============================================================================# Your Tyk Governance license key - required for agent authentication# This is provided by Tyk when you subscribe to the Governance servicelicenseKey: "your-tyk-governance-license-key"# Configuration for connecting to the Tyk Governance dashboard/servicegovernanceDashboard: server: # The gRPC endpoint URL of the Tyk Governance service # Format: hostname:port (without protocol) # This is in the format of prefixing "grpc-" to your Governance Hub URL. url: "grpc-your-governance-instance.tyk.io:443" auth: # Authentication token for this agent # Generated via API call to /auth/token endpoint # This token identifies and authorizes this specific agent token: "my-agent-token"#==============================================================================# API Provider Configurations#==============================================================================# List of API providers this agent will connect to# Each agent can connect to multiple providers of different typesinstances: #-------------------------------------------------------------------------- # Tyk Provider Configuration #-------------------------------------------------------------------------- - name: "tyk-provider" # Descriptive name for this provider instance type: "tyk" # Provider type: must be "tyk" for Tyk Dashboard config: # The URL of your Tyk Dashboard # For Kubernetes deployments, this might be an internal service URL host: "http://dashboard-svc-tyk-stack-tyk-dashboard.tyk.svc.cluster.local:3000" # API key with read access to the Tyk Dashboard # Can be obtained in Tyk Dashboard under "User" > "User Details": "Tyk Dashboard API Access Credentials" # Requires read permissions for APIs and policies auth: "your-auth-key" #-------------------------------------------------------------------------- # AWS API Gateway Provider Configuration #-------------------------------------------------------------------------- - name: "aws-provider" # Descriptive name for this AWS API Gateway instance type: "aws" # Provider type: must be "aws" for AWS API Gateway config: # AWS IAM credentials with permissions to list and get API Gateway resources # Recommended: Use an IAM role with minimal required permissions accessKeyId: "your-aws-access-key-id" accessKeySecret: "your-aws-access-key-secret" # AWS region where your API Gateway APIs are deployed # Example: us-east-1, eu-west-1, ap-southeast-2, etc. region: "us-east-1" # Optional: Temporary session token if using temporary credentials # Required only when using AWS STS temporary credentials sessionToken: "your-aws-session-token"#==============================================================================# Agent Settings#==============================================================================# Log level controls verbosity of agent logs# Options: debug, info, warn, error# Recommended: info for production, debug for troubleshootinglogLevel: debug# Health probe configuration for monitoring agent health# Used by container orchestration systems like KuberneteshealthProbe: server: # Port on which the health probe server will listen # Ensure this port is not used by other services port: 5959
# Replace it with your Tyk Governance license keyLICENSE_KEY="tyk-governance-license-key"# Replace with an available version tagVERSION="latest"docker run -d --name tyk-governance-agent \ -v $(pwd)/agent-config.yaml:/app/config.yaml \ -e TYK_AGENT_LICENSEKEY="$LICENSE_KEY" \ tykio/governance-agent:$VERSION
# For Dockerdocker logs tyk-governance-agent# For Kuberneteskubectl logs -l app=tyk-governance-agent -n your-namespace
Look for log messages indicating a successful connection:
Copy
Ask AI
Starting license validation... License validated successfully. Valid till: ...starting agentagent started successfullywaiting agent to establish health checkstarting health probes HTTP server","addr":":5959authenticated and established health streamhealth check established, waiting for sync streamagent registered successfully and established sync stream with governance dashboardwaiting for sync requests from the dashboard