6
6
- What is CloudWatch Agent and Fluentd?
7
7
8
8
9
- ## Step-01: Deploy our Sample to generate Load
9
+ ## Step-01: Deploy Sample Nginx Application to generate Load
10
10
```
11
11
# Deploy
12
12
kubectl apply -f kube-manifests
13
13
14
14
# Access Application
15
- http://<Network-Load-Balancer-URL>/app1/index.html
15
+ http://<Network-Load-Balancer-URL>/
16
16
```
17
17
18
18
## Step-02: Associate CloudWatch Policy to our EKS Worker Nodes Role
@@ -29,14 +29,14 @@ Associate Policy: CloudWatchAgentServerPolicy
29
29
30
30
### Deploy CloudWatch Agent and Fluentd as DaemonSets
31
31
- This command will
32
- - Create the Namespace amazon-cloudwatch.
33
- - Create all the necessary security objects for both DaemonSet:
34
- - SecurityAccount.
35
- - ClusterRole.
36
- - ClusterRoleBinding.
37
- - Deploy Cloudwatch-Agent (responsible for sending the metrics to CloudWatch) as a DaemonSet.
38
- - Deploy fluentd (responsible for sending the logs to Cloudwatch) as a DaemonSet.
39
- - Deploy ConfigMap configurations for both DaemonSets.
32
+ - Creates the Namespace amazon-cloudwatch.
33
+ - Creates all the necessary security objects for both DaemonSet:
34
+ - SecurityAccount
35
+ - ClusterRole
36
+ - ClusterRoleBinding
37
+ - Deploys ` Cloudwatch-Agent ` (responsible for sending the metrics to CloudWatch) as a DaemonSet.
38
+ - Deploys fluentd (responsible for sending the logs to Cloudwatch) as a DaemonSet.
39
+ - Deploys ConfigMap configurations for both DaemonSets.
40
40
```
41
41
# Template
42
42
curl -s https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart.yaml | sed "s/{{cluster_name}}/<REPLACE_CLUSTER_NAME>/;s/{{region_name}}/<REPLACE-AWS_REGION>/" | kubectl apply -f -
@@ -47,23 +47,29 @@ curl -s https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-containe
47
47
48
48
## Verify
49
49
```
50
+ # List Daemonsets
50
51
kubectl -n amazon-cloudwatch get daemonsets
51
52
```
52
53
54
+ ## Step-04: Create the load on our Sample Nginx Pod
55
+ ```
56
+ # Generate Load
57
+ kubectl run --generator=run-pod/v1 apache-bench -i --tty --rm --image=httpd -- ab -n 500000 -c 1000 http://sample-nginx-service.default.svc.cluster.local/
58
+ ```
53
59
54
- ## Step-04 : Access CloudWatch Dashboard & Generate Traffic using Postman Runner
60
+ ## Step-05 : Access CloudWatch Dashboard & Generate Traffic using Postman Runner
55
61
- Access CloudWatch Container Insigths Dashboard
56
- - Generate some traffic using Postman Runner
57
62
58
- ## Step-05: CloudWatch Log Insights
63
+
64
+ ## Step-06: CloudWatch Log Insights
59
65
- View Container logs
60
66
61
67
62
- ## Step-06 : CloudWatch Alarms from metrics
68
+ ## Step-07 : CloudWatch Alarms from metrics
63
69
- Create Alarms
64
70
65
71
66
- ## Step-07 : Clean-Up Container Insights
72
+ ## Step-08 : Clean-Up Container Insights
67
73
```
68
74
# Template
69
75
curl https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart.yaml | sed "s/{{cluster_name}}/cluster-name/;s/{{region_name}}/cluster-region/" | kubectl delete -f -
@@ -72,7 +78,7 @@ curl https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-i
72
78
curl https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/quickstart/cwagent-fluentd-quickstart.yaml | sed "s/{{cluster_name}}/eksdemo1/;s/{{region_name}}/us-east-1/" | kubectl delete -f -
73
79
```
74
80
75
- ## Step-08 : Clean-Up Application
81
+ ## Step-09 : Clean-Up Application
76
82
```
77
83
# Delete Apps
78
84
kubectl delete -f kube-manifests/
0 commit comments