> For the complete documentation index, see [llms.txt](https://docs.konvu.com/konvu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.konvu.com/konvu/get-started/connect-your-environment/source-code/self-hosted-analysis/troubleshooting.md).

# Troubleshooting

## **Upgrading to a New Version**

Check for updates:

```bash
helm repo update
helm search repo konvu/konvu-controller --versions
```

Upgrade to a specific version:

```bash
helm upgrade konvu-controller konvu/konvu-controller \
  --namespace konvu-controller \
  --values values.yaml \
  --version 1.2.0
```

## **Pods Won't Start**

Check pod events for clues:

```bash
# Check controller pod
kubectl describe pod -n konvu-controller -l app.kubernetes.io/name=konvu-controller

# Check broker pod
kubectl describe pod -n konvu-broker -l app.kubernetes.io/name=konvu-broker
```

Common issues:

* **ImagePullBackOff**: Verify Helm repository credentials (use your company token)
* **Secret not found**: Ensure secrets exist in the namespace
* **Insufficient resources**: Increase node capacity or adjust resource requests
* **GitHub App authentication failed** (broker): Verify appId, installationId, and privateKey are correct

## **Secrets Issues**

### If Using Manual Kubernetes Secrets

Check that secrets exist and are correctly configured:

```bash
# Check secrets exist
kubectl get secrets -n konvu-controller
kubectl get secrets -n konvu-broker

# Describe secret to verify keys
kubectl describe secret konvu-company-token -n konvu-controller
kubectl describe secret konvu-ai-credentials -n konvu-controller
kubectl describe secret konvu-integration-<INTEGRATION_ID> -n konvu-broker

# Check if secrets are mounted in pods
kubectl describe pod -n konvu-controller -l app.kubernetes.io/name=konvu-controller | grep -A 5 Mounts
kubectl describe pod -n konvu-broker -l app.kubernetes.io/name=konvu-broker | grep -A 5 Mounts
```

Common issues:

* Secret name doesn't match `existingCompanyTokenSecret` value in Helm
* Secret in wrong namespace
* Secret key names don't match expected keys (`company-token`, `openai-api-key`, `github-app-id`, etc.)
* Secret created after pod started (restart pods: `kubectl rollout restart deployment -n konvu-controller`)

### If Using External Secrets Operator (AWS)

Check External Secrets Operator sync status:

```bash
# Check controller secrets
kubectl describe secretstore aws-secrets-manager -n konvu-controller
kubectl get externalsecrets -n konvu-controller

# Check broker secrets
kubectl describe secretstore aws-secrets-manager -n konvu-broker
kubectl get externalsecrets -n konvu-broker

# Check External Secrets Operator logs
kubectl logs -n konvu-controller -l app.kubernetes.io/name=external-secrets
```

Verify secrets exist in AWS Secrets Manager:

```bash
aws secretsmanager list-secrets --region $AWS_REGION
aws secretsmanager get-secret-value --secret-id production-konvu-company-token --region $AWS_REGION
aws secretsmanager get-secret-value --secret-id production-konvu-github-app --region $AWS_REGION
```

## **Backend Connection Issues**

Test network connectivity from both components:

```bash
# Test controller connectivity
kubectl exec -n konvu-controller deployment/konvu-controller -- \
  wget -qO- https://sensors.konvu.com/health

# Test broker connectivity
kubectl exec -n konvu-broker deployment/konvu-broker -- \
  wget -qO- https://sensors.konvu.com/health
```

## **Broker Not Discovering Repositories**

If the broker isn't finding your repositories:

```bash
# Check broker logs for errors
kubectl logs -n konvu-broker -l app.kubernetes.io/name=konvu-broker | grep -i error

# Verify GitHub App installation
kubectl logs -n konvu-broker -l app.kubernetes.io/name=konvu-broker | grep -i "github"

# Test GitHub API access
kubectl exec -n konvu-broker deployment/konvu-broker -- \
  wget -qO- https://api.github.com/
```

Common issues:

* GitHub App not installed on the organization
* Incorrect installation ID or App ID
* Missing repository permissions on the GitHub App
* Private key format incorrect (must be PEM format)

## **Getting Help**

If you encounter issues not covered here:

1. **Collect diagnostic information**:

   ```bash
   kubectl cluster-info dump --output-directory=/tmp/konvu-diagnostics
   kubectl logs -n konvu-controller --all-containers > /tmp/konvu-logs.txt
   ```
2. **Contact Konvu support** (<support@konvu.com>) with:
   * Your cluster details (EKS version, region)
   * Error messages and logs
   * Steps to reproduce the issue


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.konvu.com/konvu/get-started/connect-your-environment/source-code/self-hosted-analysis/troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
