|
1 |
| -# Deployment logs |
| 1 | +# Kubernetes event logs |
2 | 2 |
|
3 |
| -To stream kubernetes pods events from the deployment, you can use Coder's [`coder-logstream-kube`](https://github.com/coder/coder-logstream-kube) tool. This can stream logs from the deployment to Coder's workspace startup logs. |
| 3 | +To stream Kubernetes events into your workspace startup logs, you can use Coder's [`coder-logstream-kube`](https://github.com/coder/coder-logstream-kube) tool. `coder-logstream-kube` provides useful information about the workspace pod or deployment, such as: |
4 | 4 |
|
5 |
| -`coder-logstream-kube` can give you useful information about the deployment, such as: |
6 |
| - |
7 |
| -- Easily determine the reason for a pod provision failure, or why a pod is stuck in a pending state. |
| 5 | +- Causes of pod provisioning failures, or why a pod is stuck in a pending state. |
8 | 6 | - Visibility into when pods are OOMKilled, or when they are evicted.
|
9 | 7 | - Filter by namespace, field selector, and label selector to reduce Kubernetes API load.
|
10 | 8 |
|
11 |
| -## Prerequisite |
12 |
| - |
13 | 9 | ## Prerequisites
|
14 | 10 |
|
15 |
| -`coder-logstream-kube` works with the [`kubernetes_deployment`](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/deployment) terraform resource, which requires the `coder` service account to have permission to create deployments. For example if you are using [helm](https://coder.com/docs/v2/latest/install/kubernetes#install-coder-with-helm) to install Coder, you should set `coder.serviceAccount.enableDeployments=true` in your `values.yaml` |
| 11 | +`coder-logstream-kube` works best with the [`kubernetes_deployment`](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/deployment) terraform resource, which requires the `coder` service account to have permission to create deployments. For example if you are using [helm](https://coder.com/docs/v2/latest/install/kubernetes#install-coder-with-helm) to install Coder, you should set `coder.serviceAccount.enableDeployments=true` in your `values.yaml` |
16 | 12 |
|
17 | 13 | ```diff
|
18 | 14 | coder:
|
19 | 15 | serviceAccount:
|
20 |
| - # coder.serviceAccount.workspacePerms -- Whether or not to grant the coder |
21 |
| - # service account permissions to manage workspaces. This includes |
22 |
| - # permission to manage pods and persistent volume claims in the deployment |
23 |
| - # namespace. |
24 |
| - # |
25 |
| - # It is recommended to keep this on if you are using Kubernetes templates |
26 |
| - # within Coder. |
27 | 16 | workspacePerms: true
|
28 |
| - # coder.serviceAccount.enableDeployments -- Provides the service account permission |
29 |
| - # to manage Kubernetes deployments. |
30 | 17 | - enableDeployments: false
|
31 | 18 | + enableDeployments: true
|
32 |
| - # coder.serviceAccount.annotations -- The Coder service account annotations. |
33 | 19 | annotations: {}
|
34 |
| - # coder.serviceAccount.name -- The service account name |
35 | 20 | name: coder
|
36 | 21 | ```
|
37 | 22 |
|
|
0 commit comments