Skip to content

Commit f3bbee6

Browse files
committed
docs(cpt): fix
1 parent 25e34a1 commit f3bbee6

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

observability/cockpit/how-to/send-log-from-k8s-to-cockpit.mdx renamed to observability/cockpit/how-to/send-logs-from-k8s-to-cockpit.mdx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -87,48 +87,48 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the
8787

8888
1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster
8989
2. Run the command below to install the `k8s-monitoring` Helm chart:
90-
```
91-
helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester k8s-monitoring --version 1.6.16
92-
```
93-
The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart. Make sure that you replace `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored. Make sure that you also replace `name-of-your-choice-for-your-log-ingester` with a clear name (ex. `alloy-logs-ingester`). In our configuration, we are using `alloy-lm-ingester`.
94-
Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.
95-
The DaemonSet ensures that a pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit.
90+
```
91+
helm install -f /your-path/to/values.yml name-of-your-choice-for-your-log-ingester k8s-monitoring --version 1.6.16
92+
```
93+
The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart. Make sure that you replace `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored. Make sure that you also replace `name-of-your-choice-for-your-log-ingester` with a clear name (ex. `alloy-logs-ingester`). In our configuration, we are using `alloy-lm-ingester`.
94+
Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect logs from your Kubernetes cluster.
95+
The DaemonSet ensures that a pod is running on each node in your cluster, which collects logs and forwards them to the specified Loki endpoint in your Cockpit.
9696

9797
3. Optionally, check the status of the release to ensure it was installed:
9898

99-
```
100-
helm list
101-
```
99+
```
100+
helm list
101+
```
102102

103103
## Send Kubernetes logs using Helm chart with Terraform
104104

105105
You can also use Terraform to manage and deploy Helm charts, providing you with more automation and consistency to manage your Kubernetes resources.
106106

107107
1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform provider:
108-
```terraform
109-
provider "helm" {
110-
kubernetes {
111-
host = your_k8s_cluster_host # The URL of your Kubernetes API server.
112-
token = your_k8s_cluster_token # Authentication token to access the cluster.
113-
cluster_ca_certificate = base64decode(
114-
your_k8s_cluster_ca_certificate # The cluster's CA certificate.
115-
)
108+
```terraform
109+
provider "helm" {
110+
kubernetes {
111+
host = your_k8s_cluster_host # The URL of your Kubernetes API server.
112+
token = your_k8s_cluster_token # Authentication token to access the cluster.
113+
cluster_ca_certificate = base64decode(
114+
your_k8s_cluster_ca_certificate # The cluster's CA certificate.
115+
)
116+
}
116117
}
117-
}
118-
```
118+
```
119119
2. Create a `maint.tf` file and paste the following template to create a Helm release resource. Make sure that you replace `/your-path/to/values.yml` with the actual path to your values file.
120-
```
121-
resource "helm_release" "alloy" {
122-
name = "name-of-your-log-ingester"
123-
repository = "https://grafana.github.io/helm-charts"
124-
chart = "k8s-monitoring"
125-
version = "2.0.2"
126-
127-
namespace = "log-ingester"
128-
create_namespace = true
129-
values = [file("/your-path/to/values.yml")]
130-
}
131-
```
120+
```
121+
resource "helm_release" "alloy" {
122+
name = "name-of-your-log-ingester"
123+
repository = "https://grafana.github.io/helm-charts"
124+
chart = "k8s-monitoring"
125+
version = "2.0.2"
126+
127+
namespace = "log-ingester"
128+
create_namespace = true
129+
values = [file("/your-path/to/values.yml")]
130+
}
131+
```
132132
3. Save your changes.
133133
4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers.
134134
5. Run `terraform apply` to apply your configuration.

observability/cockpit/how-to/send-metrics-from-k8s-to-cockpit.mdx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -112,30 +112,30 @@ resource "kubernetes_deployment_v1" "your_application_deployment" {
112112
## Send Kubernetes metrics using Helm chart with Terraform
113113

114114
1. Create a `provider.tf` file and paste the following template to set up the Helm Terraform provider:
115-
```terraform
116-
provider "helm" {
117-
kubernetes {
118-
host = your_k8s_cluster_host # The URL of your Kubernetes API server.
119-
token = your_k8s_cluster_token # Authentication token to access the cluster.
120-
cluster_ca_certificate = base64decode(
121-
your_k8s_cluster_ca_certificate # The cluster's CA certificate.
122-
)
115+
```terraform
116+
provider "helm" {
117+
kubernetes {
118+
host = your_k8s_cluster_host # The URL of your Kubernetes API server.
119+
token = your_k8s_cluster_token # Authentication token to access the cluster.
120+
cluster_ca_certificate = base64decode(
121+
your_k8s_cluster_ca_certificate # The cluster's CA certificate.
122+
)
123+
}
123124
}
124-
}
125-
```
125+
```
126126
2. Create a `maint.tf` file and paste the following template to create a Helm release resource. Make sure that you replace `/your-path/to/values.yml` with the actual path to your values file.
127-
```
128-
resource "helm_release" "alloy" {
129-
name = "name-of-your-metrics-ingester"
130-
repository = "https://grafana.github.io/helm-charts"
131-
chart = "k8s-monitoring"
132-
version = "2.0.2"
133-
134-
namespace = "metrics-ingester"
135-
create_namespace = true
136-
values = [file("/your-path/to/values.yml")]
137-
}
138-
```
127+
```
128+
resource "helm_release" "alloy" {
129+
name = "name-of-your-metrics-ingester"
130+
repository = "https://grafana.github.io/helm-charts"
131+
chart = "k8s-monitoring"
132+
version = "2.0.2"
133+
134+
namespace = "metrics-ingester"
135+
create_namespace = true
136+
values = [file("/your-path/to/values.yml")]
137+
}
138+
```
139139
3. Save your changes.
140140
4. Run `terraform init` to initialize your Terraform configuration and download any necessary providers.
141141
5. Run `terraform apply` to apply your configuration.
@@ -147,12 +147,12 @@ Once you have configured your `values.yml` file, you can use Helm to deploy the
147147

148148
1. [Connect](/containers/kubernetes/how-to/connect-cluster-kubectl/) `kubectl` to your Kubernetes cluster
149149
2. Run the command below to install the `k8s-monitoring` Helm chart:
150-
```
151-
helm install -f /your-path/to/values.yml name-of-your-choice-for-your-metric-ingester k8s-monitoring --version 1.6.16
152-
```
153-
The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart. Make sure that you replace `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored. Make sure that you also replace `name-of-your-choice-for-your-metric-ingester` with a clear name (ex. `alloy-metrics-ingester`). In our configuration, we are using `alloy-lm-ingester`.
154-
Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect metrics from your Kubernetes cluster.
155-
The DaemonSet ensures that a pod is running on each node in your cluster, which collects metrics and forwards them to the specified Prometheus endpoint in your Cockpit.
150+
```
151+
helm install -f /your-path/to/values.yml name-of-your-choice-for-your-metric-ingester k8s-monitoring --version 1.6.16
152+
```
153+
The `-f` flag specifies the path to your `values.yml` file, which contains the configuration for the Helm chart. Make sure that you replace `/your-path/to/values.yml` with the correct path where your `values.yml` file is stored. Make sure that you also replace `name-of-your-choice-for-your-metric-ingester` with a clear name (ex. `alloy-metrics-ingester`). In our configuration, we are using `alloy-lm-ingester`.
154+
Helm installs the `k8s-monitoring` chart, which includes the Alloy DaemonSet configured to collect metrics from your Kubernetes cluster.
155+
The DaemonSet ensures that a pod is running on each node in your cluster, which collects metrics and forwards them to the specified Prometheus endpoint in your Cockpit.
156156

157157
3. Optionally, check the status of the release to ensure it was installed:
158158

0 commit comments

Comments
 (0)