-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(managing-ingress): rewrite Gateway page to Managing Ingress Traf…
…fic (#1582) Signed-off-by: Mike Beaumont <[email protected]> Signed-off-by: Lukasz Dziedziak <[email protected]> Signed-off-by: Krzysztof Słonka <[email protected]> Signed-off-by: Charly Molter <[email protected]> Co-authored-by: Lukasz Dziedziak <[email protected]> Co-authored-by: Krzysztof Słonka <[email protected]> Co-authored-by: Charly Molter <[email protected]> Co-authored-by: Philipp Rudloff <[email protected]>
- Loading branch information
1 parent
c2a2cd0
commit 316d242
Showing
18 changed files
with
1,256 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
app/_src/using-mesh/managing-ingress-traffic/builtin-k8s.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
title: Running built-in gateway pods on Kubernetes | ||
--- | ||
|
||
`MeshGatewayInstance` is a Kubernetes-only resource for deploying [{{site.mesh_product_name}}'s builtin gateway](/docs/{{ page.version }}/using-mesh/managing-ingress-traffic/builtin). | ||
|
||
[`MeshGateway`](/docs/{{ page.version }}/using-mesh/managing-ingress-traffic/builtin-listeners) and [`MeshHTTPRoute`](/docs/{{ page.version }}/policies/meshhttproute)/[`MeshTCPRoute`](/docs/{{ page.version }}/policies/meshtcproute) allow specifying builtin gateway | ||
listener and route configuration but don't handle deploying `kuma-dp` | ||
instances that listen and serve traffic. | ||
|
||
Kuma offers `MeshGatewayInstance` to manage a Kubernetes `Deployment` and `Service` | ||
that together provide service capacity for the `MeshGateway` with the matching `kuma.io/service` tag. | ||
|
||
{% tip %} | ||
If you're not using the `default` `Mesh`, you'll need to _label_ the | ||
`MeshGatewayInstance` using `kuma.io/mesh`. | ||
{% endtip %} | ||
|
||
Consider the following example: | ||
|
||
```yaml | ||
apiVersion: kuma.io/v1alpha1 | ||
kind: MeshGatewayInstance | ||
metadata: | ||
name: edge-gateway | ||
namespace: default | ||
labels: | ||
kuma.io/mesh: default # only necessary if not using default Mesh | ||
spec: | ||
replicas: 2 | ||
serviceType: LoadBalancer | ||
tags: | ||
kuma.io/service: edge-gateway | ||
``` | ||
Once a `MeshGateway` exists with `kuma.io/service: edge-gateway`, the control plane creates a new `Deployment` in the `default` namespace. | ||
This `Deployment` deploys 2 replicas of `kuma-dp` and corresponding builtin gateway `Dataplane` running with `kuma.io/service: edge-gateway`. | ||
The control plane also creates a new `Service` to send network traffic to the builtin `Dataplane` pods. | ||
The `Service` is of type `LoadBalancer`, and its ports are automatically adjusted to match the listeners on the corresponding `MeshGateway`. | ||
|
||
## Customization | ||
|
||
Additional customization of the generated `Service` or `Pods` is possible via `spec.serviceTemplate` and `spec.podTemplate`. | ||
For example, you can add annotations and/or labels to the generated objects: | ||
|
||
```yaml | ||
spec: | ||
replicas: 1 | ||
serviceType: LoadBalancer | ||
tags: | ||
kuma.io/service: edge-gateway | ||
resources: | ||
limits: ... | ||
requests: ... | ||
serviceTemplate: | ||
metadata: | ||
annotations: | ||
service.beta.kubernetes.io/aws-load-balancer-internal: "true" | ||
spec: | ||
loadBalancerIP: ... | ||
podTemplate: | ||
metadata: | ||
labels: | ||
app-name: my-app | ||
... | ||
``` | ||
|
||
You can also modify several security-related parameters for the generated `Pods` or specify a `loadBalancerIP` for the `Service`: | ||
|
||
```yaml | ||
spec: | ||
replicas: 1 | ||
serviceType: LoadBalancer | ||
tags: | ||
kuma.io/service: edge-gateway | ||
resources: | ||
limits: ... | ||
requests: ... | ||
serviceTemplate: | ||
metadata: | ||
labels: | ||
svc-id: "19-001" | ||
spec: | ||
loadBalancerIP: ... | ||
podTemplate: | ||
metadata: | ||
annotations: | ||
app-monitor: "false" | ||
spec: | ||
serviceAccountName: my-sa | ||
securityContext: | ||
fsGroup: ... | ||
container: | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
``` | ||
|
||
## Schema | ||
|
||
{% json_schema kuma.io_meshgatewayinstances type=crd %} |
Oops, something went wrong.