Installing the Wenti Kubernetes Agent with Helm
This guide will help you install the Wenti Kubernetes agent using Helm. The agent automatically discovers your ingress resources and integrates them with the Wenti platform for seamless URL monitoring.
Prerequisites
Before you begin, ensure you have the following:
- Kubernetes Cluster: A running Kubernetes cluster (version 1.16 or later).
- kubectl: Kubernetes command-line tool configured to communicate with your cluster.
- Helm: Helm package manager installed (version 3.0 or later).
- Wenti Account: An active Wenti account with API credentials.
Step 1: Obtain Your Wenti API Key
You’ll need your Wenti API key to authenticate the agent with the Wenti platform.
- Log in to your Wenti account at https://app.wenti.dev.
- Navigate to Account Settings > API Keys.
- Click on Generate New API Key.
- Copy the generated API key for use in the next step.
Step 2: Install the Wenti Agent
Use Helm to install the Wenti agent into your Kubernetes cluster. Replace <YOUR_API_KEY> with the API key you obtained in Step 1.
helm upgrade --install wenti-agent oci://ghcr.io/wentidev/helm/agent --version v0.6.0 \
--namespace wenti-system --create-namespace \
--set config.apiKey=<YOUR_API_KEY>
This command will:
- Install the Wenti agent with the release name wenti-agent.
- Create a new namespace wenti-system for the agent.
- Set the apiKey value required for authentication.
Step 3: Verify the Installation
Check that the Wenti agent is running correctly:
kubectl get pods -n wenti-system
You should see a pod named wenti-agent with a status of Running.
Step 4: Update your Ingress
To monitor specific Ingress resources with Wenti, you need to add the following annotations to the Ingress objects you wish to monitor.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: default
namespace: default
annotations:
wenti.dev/health-check-port: "443"
wenti.dev/health-check-interval: "10"
wenti.dev/health-check-timeout: "5"
wenti.dev/health-check-path: /
wenti.dev/health-check-protocol: HTTP
wenti.dev/health-check-method: GET
wenti.dev/health-check-success-codes: "200"
Step 5: Confirm Ingress Discovery
The Wenti agent will automatically discover your ingress resources and register them with the Wenti platform.
- Log in to your Wenti dashboard at https://app.wenti.dev.
- Navigate to Monitored URLs.
- You should now see a list of URLs corresponding to your ingress resources.
Optional Configurations
Customize Resource Limits
Adjust the resource requests and limits for the agent:
helm upgrade --install wenti-agent oci://ghcr.io/wentidev/helm/agent --version v0.6.0 \
--namespace wenti-system --create-namespace \
--set resources.requests.cpu=100m \
--set resources.requests.memory=128Mi \
--set resources.limits.cpu=200m \
--set resources.limits.memory=256Mi
Upgrading the Agent
To upgrade the agent to the latest version:
helm upgrade --install wenti-agent oci://ghcr.io/wentidev/helm/agent --version v0.6.0 \
--namespace wenti-system --create-namespace \
--set config.apiKey=<YOUR_API_KEY>
Uninstalling the Agent
To remove the Wenti agent from your cluster:
helm uninstall wenti-agent --namespace wenti-system
kubectl delete namespace wenti-system
Troubleshooting
Agent Pod Not Running
- Check Pod Status:
kubectl describe pod wenti-agent -n wenti-system
- View Logs:
kubectl logs wenti-agent -n wenti-system
Ingresses Not Discovered
- Ensure your ingress resources are correctly defined and accessible.
- Verify that the agent has the necessary permissions to list and watch ingress resources.
Connection Issues
- Verify that your cluster can reach api.wenti.dev on the necessary ports.
- Check proxy settings if your environment requires one.