Add kubernetes configuration how-to (#521)

* Add kubernetes configuration how-to

* mark comment :)

* update

* update index
This commit is contained in:
Yaron Schneider 2020-04-14 14:57:35 -07:00 committed by GitHub
parent 7ca0db99af
commit ea5b191877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 6 deletions

View File

@ -205,6 +205,10 @@ dapr-sidecar-injector-8555576b6f-29cqm 1/1 Running 0 40s
dapr-sentry-9435776c7f-8f7yd 1/1 Running 0 40s
```
#### Sidecar annotations
To see all the supported annotations for the Dapr sidecar on Kubernetes, visit [this](../howto/configure-k8s/README.md) how to guide.
#### Uninstall Dapr on Kubernetes
Helm 3

View File

@ -11,8 +11,8 @@ Here you'll find a list of How To guides that walk you through accomplishing spe
- [Observerability](#observerability)
- [Security](#security)
- [Components](#components)
- [Hosting Platforms](#hosting-platforms)
- [Developer tooling](#developer-tooling)
- [Infrastructure integration](#Infrastructure-integration)
## Service invocation
@ -32,7 +32,6 @@ Here you'll find a list of How To guides that walk you through accomplishing spe
* [Control your app's throttling using rate limiting features](./control-concurrency)
* [Configuring Redis for state management ](./configure-redis)
## Pub/Sub
* [Setup Dapr Pub/Sub](./setup-pub-sub-message-broker)
@ -77,6 +76,12 @@ For Actors How Tos see the SDK documentation
* [Limit components for one or more applications using scopes](./components-scopes)
## Hosting Platforms
### Kubernetes Configuration
* [Sidecar configuration on Kubernetes](./configure-k8s)
* [Autoscale on Kubernetes using KEDA and Dapr bindings](./autoscale-with-keda)
## Developer tooling
### Using Visual Studio Code
@ -92,7 +97,3 @@ For Actors How Tos see the SDK documentation
### SDKs
* [Serialization in Dapr's SDKs](./serialize)
## Infrastructure integration
* [Autoscale on Kubernetes using KEDA and Dapr bindings](./autoscale-with-keda)

View File

@ -0,0 +1,23 @@
# Configuring the Dapr sidecar on Kubernetes
On Kubernetes, Dapr uses a sidecar injector pod that automatically injects the Dapr sidecar container into a pod that has the correct annotations.
The sidecar injector is an implementation of a Kubernetes [Admission Controller](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/).
The following table shows all the supported pod Spec annotations supported by Dapr.
| Annotation | Description
| ----------------------------------- | -------------- |
| `dapr.io/enabled` | Setting this paramater to `true` injects the Dapr sidecar into the pod
| `dapr.io/port` | This parameter tells Dapr which port your application is listening on
| `dapr.io/id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID
| `dapr.io/log-level` | Sets the log level for the Dapr sidecar. Allowed values are `debug`, `info`, `warn`, `error`. Default is `info`
| `dapr.io/config` | Tells Dapr which Configuration CRD to use
| `dapr.io/log-as-json` | Setting this parameter to `true` outputs logs in JSON format. Default is `false`
| `dapr.io/profiling` | Setting this paramater to `true` starts the Dapr profiling server on port `7777`. Default is `false`
| `dapr.io/protocol` | Tells Dapr which protocol your application is using. Valid options are `http` and `grpc`. Default is `http`
| `dapr.io/max-concurrency` | Limit the concurrency of your application. A valid value is any number larger than `0`
| `dapr.io/metrics-port` | Sets the port for the sidecar metrics server. Default is `9090`
| `dapr.io/sidecar-cpu-limit` | Maximum amount of CPU that the Dapr sidecar can use. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set
| `dapr.io/sidecar-memory-limit` | Maximum amount of Memory that the Dapr sidecar can use. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set
| `dapr.io/sidecar-cpu-request` | Amount of CPU that the Dapr sidecar requests. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set
| `dapr.io/sidecar-memory-request` | Amount of Memory that the Dapr sidecar requests .See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set