Skip to content

docs: expand Divert setup, shared environments, and troubleshooting - #1155

Open
codyjlandstrom wants to merge 5 commits into
mainfrom
cody/divert-docs-feedback
Open

docs: expand Divert setup, shared environments, and troubleshooting#1155
codyjlandstrom wants to merge 5 commits into
mainfrom
cody/divert-docs-feedback

Conversation

@codyjlandstrom

@codyjlandstrom codyjlandstrom commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Expands the Divert docs based on the feedback from the initial release, and reconciles the branch with everything that landed on main since February.

What this adds

  • A setup path on the core concepts page (core/divert.mdx): prerequisites by role, driver configuration, shared environment creation, manifest configuration, and verification. Each step links to the detailed guide instead of repeating it.
  • Setting Up Shared Environments: how to create the shared namespace (Global Preview Environment vs regular Namespace), shared vs per-developer databases (with the Volume Snapshots tie-in), the hybrid pattern, and verification steps.
  • Troubleshooting, split by audience: developer issues (header propagation, routing verification, a diagnostic checklist) live in Using Divert; admin issues (driver configuration, ingress controllers, sidecar injection) live in Configure Divert. The core page links to both instead of carrying a third copy.

Corrections from the original draft

  • Linkerd is documented as optional for the nginx driver. The original draft said it was required. Without Linkerd, the nginx driver routes at the ingress level; installing Linkerd extends header-based routing to service-to-service calls. This matches the CLI behavior and the chart.
  • Removed a divert.debug manifest field that does not exist in the CLI schema.
  • Removed an api.logLevel Helm value that does not exist in the chart.
  • Dropped the inline Istio installation instructions (they duplicated the newer Istio installation guide and pointed at the old sample repo). The page links to the guide instead.
  • Dropped the versioned_docs/version-1.40 copies. 1.47 is current, so this content targets src/content/ only.

Merge with main

Merged main and kept everything that landed since this branch was opened: the Istio installation guide (#1177), the ingress controllers architecture section (#1187), the okteto-community sample repo URLs (#1178, #1196), and the virtualServices/hosts field documentation (#1197). Also fixed two pre-existing broken relative links in the Configure Divert "Next Steps" section.

Style pass done per STYLE_GUIDE.md. yarn build passes.

🤖 Generated with Claude Code

@netlify

netlify Bot commented Feb 4, 2026

Copy link
Copy Markdown

Deploy Preview for okteto-docs ready!

Name Link
🔨 Latest commit 31f4827
🔍 Latest deploy log https://app.netlify.com/projects/okteto-docs/deploys/6982e90ffae84f0008694070
😎 Deploy Preview https://deploy-preview-1155--okteto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for okteto-docs ready!

Name Link
🔨 Latest commit f7eb346
🔍 Latest deploy log https://app.netlify.com/projects/okteto-docs/deploys/6a8db117a0fe900008c9bf09
😎 Deploy Preview https://deploy-preview-1155--okteto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Document Linkerd as optional for the nginx driver: ingress-level
  routing works without it, Linkerd extends routing to
  service-to-service calls. The original draft said it was required.
- Remove the divert.debug manifest field and the api.logLevel Helm
  value; neither exists in the CLI schema or the chart.
- Replace the step-by-step getting started section with a role-based
  setup path that links to the detailed guides instead of repeating
  their content.
- Split troubleshooting by audience: developer issues in Using Divert,
  admin issues in Configure Divert. The core page links to both.
- Keep everything that landed on main after this branch was opened:
  the Istio installation guide, the ingress controller architecture
  section, the okteto-community sample URLs, and the
  virtualServices/hosts field docs.
- Drop the versioned_docs/version-1.40 copies; 1.47 is current and
  new content targets src/content only.
- Style pass per STYLE_GUIDE.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Cody Landstrom <cody@okteto.com>
@codyjlandstrom codyjlandstrom changed the title Cody/divert docs feedback docs: expand Divert setup, shared environments, and troubleshooting Aug 19, 2026
@codyjlandstrom
codyjlandstrom marked this pull request as ready for review August 25, 2026 15:15
linkerd viz check
```

## Configure Okteto for Linkerd

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some other configuration missed. Some changes in the okteto-nginx has to change, and a feature has to be enabled. Please, check the notion document, all the config changes needed are there

Comment on lines 98 to 100
namespace:
annotations:
linkerd.io/inject: enabled

@ifbyol ifbyol Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct. Adding this would imply that every namespace within Okteto would have the sidecard injection, but this is only needed in the shared environments, not in the rest of cases


:::info
Linkerd is **optional** for the nginx driver. The basic Divert functionality works without it, but Linkerd enables enhanced service-to-service routing within the mesh.
Linkerd is **optional** for the nginx driver. Without Linkerd, Divert routes traffic at the ingress level. Installing Linkerd extends header-based routing to service-to-service calls inside the cluster.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should promote the usage of the nginx driver without Linkerd. it is easy that at some point some scenario where service-to-service communication is needed, and stops working, and people might think that Divert is not working fine

helm upgrade okteto okteto/okteto -f values.yaml
```

### Existing Namespaces

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is important to highlight that this is only needed for shared environments. The rest of namespace doesn't require to do this

3. **Load balancing**: Intelligent load balancing across service instances
3. **Load balancing**: Latency-aware load balancing across service instances
4. **mTLS**: Automatic mutual TLS between services for enhanced security
5. **Observability**: Detailed metrics and tracing for diverted traffic (visible to administrators)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mention this for now, we didn't do any check on what is visible or not, and how they could be integrated with Okteto.

My fear is that if we mention this, people might expect having those metrics accessible somewhere, and right now is not possible

Comment on lines 402 to 406
// Using Spring's WebClient
webClient.get()
.uri("http://catalog-service/api/movies")
.header("baggage", baggage)
.retrieve();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this sample we are missing how to extract the value of the baggage header


1. Deploys only the services defined in your manifest
2. Configures routing to redirect requests for missing services to the shared namespace
3. Injects the `baggage: okteto-divert=<your-namespace>` header into requests through your endpoints

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is important to mention that the header is automatically injected in the endpoints for the diverted/user's namespace.

It is also important to mention here that any public endpoint from the staging environment is also generated for the diverted/user's namespace. I mean, we don't only generate the endpoints for the services deployed, we also generate different ones for the services not deployed (if they are generated in the shared namespace)

okteto deploy -f okteto.frontend.yaml
```

## Header Propagation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already mentioned in the general divert page, but it might also fit here. We can mention that there are libraries in a lot of programming languages as we use baggage header which is commonly used to propagate context or tracing information between services

Comment on lines 275 to 279
if (targetNamespace === CURRENT_NAMESPACE || targetNamespace === 'shared') {
// Process this message
await processOrder(JSON.parse(message.Body));
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might refer to OKTETO_DIVERTED_NAMESPACE env var, as we are injecting it into diverted namespaces to be used to consume the expected messages. Some of our samples use this pattern, you can check them

}
```

### Kafka Topic Routing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use this the kafka consumer has to be configured to use Consumer Groups, it might be relevant to mention it here to avoid misunderstandings. If not, this pattern wouldn't work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants