Skip to content

Commit 415e8fa

Browse files
ctauchenclaude
andcommitted
DOCS-2549: Update CC L7 logs to use deployment-patch method
Replace outdated service-annotation method (kubectl annotate svc) with the deployment-patch approach from CE 3.22-2, add comprehensive limitations, and improve heading structure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ec0eec1 commit 415e8fa

File tree

1 file changed

+47
-24
lines changed

1 file changed

+47
-24
lines changed

calico-cloud/observability/elastic/l7/configure.mdx

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,36 @@ L7 logs are visible in the web console, service graph, in the HTTP tab.
4040
**Not supported**
4141
- GKE
4242

43-
**Limitations**
43+
### Limitations
4444

45-
- L7 log collection is not supported for host-networked client pods.
46-
- When selecting and deselecting traffic for L7 log collection, active connections may be disrupted.
45+
* L7 log collection is not compatible with a service mesh such as Istio.
46+
* L7 log collection is not supported for host-networked client pods.
47+
* L7 log collection is supported only on Kubernetes 1.29 and later.
4748

48-
{/*TODO-XREFS-CC
49-
Note removed for CC
50-
*/}
49+
:::important
5150

52-
## How to
51+
When you enable L7 log collection for a deployment, all of that deployment's pods will restart.
52+
Selecting and deselecting traffic for L7 log collection may result in disruptions for active connections.
5353

54-
- [Configure Felix for log data collection](#configure-felix-for-log-data-collection)
55-
- [Configure L7 logs](#configure-l7-logs)
56-
- [View L7 logs in the web console](#view-l7-logs-in-manager-ui)
54+
:::
55+
56+
:::note
57+
58+
L7 logs require a minimum of 1 additional GB of log storage per node, per one-day retention period. Adjust your [Log Storage](../../../operations/logstorage/adjust-log-storage-size.mdx) before you start tasks in the next section.
59+
60+
:::
5761

58-
### Configure Felix for log data collection
62+
## Configure Felix for log data collection
5963

6064
1. Configure L7 log aggregation, retention, and reporting.
6165

6266
For help, see [Felix Configuration documentation](../../../reference/component-resources/node/felix/configuration.mdx#calico-enterprise-specific-configuration).
6367

64-
### Configure L7 logs
68+
## Configure L7 logs
6569

6670
In this step, you will configure L7 logs, select logs for collection, and test the configuration.
6771

68-
**Configure the ApplicationLayer resource for L7 logs**
72+
### Configure the ApplicationLayer resource for L7 logs
6973

7074
1. Create or update the [ApplicationLayer](../../../reference/installation/api.mdx#applicationlayer) resource named, `tigera-secure`.
7175

@@ -99,25 +103,44 @@ In this step, you will configure L7 logs, select logs for collection, and test t
99103
kubectl rollout status -n calico-system ds/l7-log-collector --timeout=120s
100104
```
101105
102-
**Select traffic for L7 log collection**
106+
### Quickstart: enable log collection on an example app
103107
104-
1. Annotate the services you wish to collect L7 logs as shown.
108+
1. Install Google Microservices Demo
105109
106110
```bash
107-
kubectl annotate svc <service-name> -n <service-namespace> projectcalico.org/l7-logging=true
111+
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/refs/heads/main/release/kubernetes-manifests.yaml
108112
```
109113
110-
2. To disable the L7 log collection, remove the annotation.
114+
without the `-n <namespace>` flag, it is going to be installed in the `default` namespace. if you wish to install in a different namespace, specify the `-n <namespace>` flag on all other commands in this tutorial from this point on.
115+
116+
1. Patch the `frontend` application deployment to start collecting L7 logs for this application
111117
112118
```bash
113-
kubectl annotate svc <service-name> -n <service-namespace> projectcalico.org/l7-logging-
119+
kubectl patch deployment frontend -p '{"spec":{"template":{"metadata":{"labels":{"applicationlayer.projectcalico.org/sidecar":"true"},"annotations":{"applicationlayer.projectcalico.org/logging":"Enabled"}}}}}'
114120
```
115121
116-
After annotating a service for L7 log collection, only newly-established connections through that service are proxied by Envoy. Connections established before the service is annotated are not proxied or interrupted, and no logs are generated.
122+
The above command applies the following patch:
123+
1. ensures pods in your `frontend` deployment pod template spec has the label `applicationlayer.projectcalico.org/sidecar: true`
124+
1. ensures pods in your `frontend` deployment pod template spec has the following annotations:
125+
- `applicationlayer.projectcalico.org/logging: Enabled`
117126
118-
Conversely, when a service is deselected, any previous connections established through the annotated service continue to be proxied by Envoy until they are terminated, and logs are generated.
127+
Deployment pods will then be expected to restart. Monitor its progress with:
128+
129+
```bash
130+
kubectl rollout status deployment frontend
131+
```
132+
133+
[Google Microservices Demo](https://github.com/GoogleCloudPlatform/microservices-demo) includes a load generator. L7 logs should now start displaying log entries that can be viewed via [various UIs](#view-l7-logs-in-the-web-console)
134+
135+
Alternatively, it is possible to test your configuration [manually](#test-your-configuration).
136+
137+
1. To disable L7 log collection, reverse the above patch with the following command.
138+
139+
```bash
140+
kubectl patch deployment frontend --type='json' -p '[{"op":"remove","path":"/spec/template/metadata/labels/applicationlayer.projectcalico.org~1sidecar"},{"op":"remove","path":"/spec/template/metadata/annotations/applicationlayer.projectcalico.org~1logging"}]'
141+
```
119142
120-
**Test your configuration**
143+
### Test your configuration
121144
122145
1. Identify the path to access your cluster. Where `<path>` can be:
123146
@@ -131,9 +154,9 @@ Conversely, when a service is deselected, any previous connections established t
131154
curl --head <path to access service>:<optional port>/<path>
132155
```
133156
134-
### View L7 logs in the web console
157+
## View L7 logs in the web console
135158
136-
**Service Graph**
159+
### Service Graph
137160
138161
To view L7 logs in Service Graph:
139162
@@ -142,7 +165,7 @@ To view L7 logs in Service Graph:
142165
143166
![l7-logs](/img/calico-enterprise/l7-logs.png)
144167
145-
**Kibana**
168+
### Kibana
146169
147170
To view L7 logs by index pattern in Kibana:
148171

0 commit comments

Comments
 (0)