Kubetrace Operator
Overview
The Kubetrace Operator is a critical component that manages cluster tracing and automates secure token refresh operations. This operator is dynamically generated based on your cluster configuration and integrates with Vultr Container Registry for secure credential management. Important: The operator YAML manifest is not static. It is generated after your kubeconfig file is created and includes:- Cluster-specific configuration
- Dynamically fetched registry credentials from Vultr
- Automated token refresh mechanism that periodically updates Kubernetes authentication tokens
Steps
1. Generate and Install Kubetrace Operator
Description:Deploy the Kubetrace operator to manage cluster tracing and automate token refresh for secure operations.
-
Review the Manifest (Optional):
The generated manifest will include:
- A
Secretcontaining base64-encoded Docker registry credentials and operator tokens - A
Deploymentconfigured with your cluster-specific environment variables - Appropriate service account bindings
- A
- Apply the Operator Manifest:
-
Verify the Operator is Running:
Expected output:
-
Check Operator Logs:
You should see logs indicating successful token refresh and API connectivity.
Operator Configuration
The operator manifest includes the following key components: Secret Configuration:- Contains encrypted Docker registry credentials for pulling operator images from Vultr Container Registry
- Includes the operator token used for authenticating with the Kubetrace API
- All sensitive data is base64-encoded and should never be committed to version control
- Uses a dedicated service account (
kubetrace-readonly-user) with minimal required permissions - Configured with environment variables including:
API_URL: Kubetrace API endpoint for token refresh operationsCLUSTER_ID: Your unique cluster identifier
- Resource requests and limits ensure stable operation without excessive resource consumption
- The operator automatically communicates with the Kubetrace API at regular intervals
- Fetches fresh authentication tokens and updates the kubeconfig secret
- Ensures uninterrupted monitoring without manual token management
Security Considerations
- Never share your operator manifest: It contains sensitive credentials specific to your cluster
- Regenerate tokens if compromised: Use the Kubetrace dashboard to revoke and regenerate operator credentials
- Monitor operator logs: Regularly check logs for any authentication failures or connectivity issues
- Keep operator updated: Apply updates when new versions are released to maintain security patches
Troubleshooting
Operator Pod Not Starting
Issue: Operator pod is inImagePullBackOff or ErrImagePull state
Solution:
- Verify the image pull secret exists:
- Check if the secret is correctly referenced in the deployment
- Ensure network connectivity to Vultr Container Registry (blr.vultrcr.com), and verify that port 443 is open.
Token Refresh Failures
Issue: Logs show authentication errors when refreshing tokens Solution:- Check if the
operator_tokenin the secret is valid - Verify the
API_URLenvironment variable is correct - Ensure the operator has network access to gateway.kubetrace.net
- Regenerate operator credentials from the Kubetrace dashboard if needed
Service Account Permissions
Issue: Operator logs show permission denied errors Solution:- Verify the service account exists:
- Check role bindings:
- Reapply the service account and RBAC configuration
Checking Operator Health
Commands to verify operator status:Best Practices
- Regular Monitoring: Set up alerts for operator pod restarts or failures
- Backup Configuration: Keep a secure backup of your operator credentials (encrypted)
- Update Strategy: Follow a rolling update strategy when upgrading the operator
- Resource Allocation: Monitor and adjust resource requests/limits based on cluster size
- Network Policies: Ensure network policies allow operator communication with Kubetrace APIs
Kubetrace Support
- Documentation: Visit docs.kubetrace.net for detailed guide
- Email Support: Contact support@kubetrace.co