File tree Expand file tree Collapse file tree 3 files changed +126
-2
lines changed
examples/existing-cluster-nginx Expand file tree Collapse file tree 3 files changed +126
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ EXTERNAL_IP=your-nginx-controller-external-ip
103103
104104``` sh
105105SAMPLE_TRAFFIC_NAMESPACE=nginx-sample-traffic
106- curl https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/master/k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus /sample_traffic/nginx-traffic /nginx-traffic-sample.yaml |
106+ curl https://raw.githubusercontent.com/aws-observability/terraform-aws-observability-accelerator/main/examples/existing-cluster-nginx /sample_traffic/nginx-traffic-sample.yaml |
107107sed " s/{{external_ip}}/$EXTERNAL_IP /g" |
108108sed " s/{{namespace}}/$SAMPLE_TRAFFIC_NAMESPACE /g" |
109109kubectl apply -f -
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ EXTERNAL_IP=your-nginx-controller-external-ip
160160
161161``` sh
162162SAMPLE_TRAFFIC_NAMESPACE=nginx-sample-traffic
163- curl https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/master/k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/ sample_traffic/nginx-traffic /nginx-traffic-sample.yaml |
163+ cat ./ sample_traffic/nginx-traffic-sample.yaml |
164164sed " s/{{external_ip}}/$EXTERNAL_IP /g" |
165165sed " s/{{namespace}}/$SAMPLE_TRAFFIC_NAMESPACE /g" |
166166kubectl apply -f -
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Namespace
3+ metadata :
4+ name : {{namespace}}
5+ labels :
6+ name : {{namespace}}
7+
8+ ---
9+
10+ kind : Pod
11+ apiVersion : v1
12+ metadata :
13+ name : banana-app
14+ namespace : {{namespace}}
15+ labels :
16+ app : banana
17+ spec :
18+ containers :
19+ - name : banana-app
20+ image : hashicorp/http-echo
21+ args :
22+ - " -text=banana"
23+ resources :
24+ limits :
25+ cpu : 100m
26+ memory : 100Mi
27+ requests :
28+ cpu : 50m
29+ memory : 50Mi
30+ ---
31+
32+ kind : Service
33+ apiVersion : v1
34+ metadata :
35+ name : banana-service
36+ namespace : {{namespace}}
37+ spec :
38+ selector :
39+ app : banana
40+ ports :
41+ - port : 5678 # Default port for image
42+
43+ ---
44+
45+ kind : Pod
46+ apiVersion : v1
47+ metadata :
48+ name : apple-app
49+ namespace : {{namespace}}
50+ labels :
51+ app : apple
52+ spec :
53+ containers :
54+ - name : apple-app
55+ image : hashicorp/http-echo
56+ args :
57+ - " -text=apple"
58+ resources :
59+ limits :
60+ cpu : 100m
61+ memory : 100Mi
62+ requests :
63+ cpu : 50m
64+ memory : 50Mi
65+ ---
66+
67+ kind : Service
68+ apiVersion : v1
69+ metadata :
70+ name : apple-service
71+ namespace : {{namespace}}
72+ spec :
73+ selector :
74+ app : apple
75+ ports :
76+ - port : 5678 # Default port for image
77+
78+ ---
79+
80+ apiVersion : networking.k8s.io/v1
81+ kind : Ingress
82+ metadata :
83+ name : ingress-nginx-demo
84+ namespace : {{namespace}}
85+ spec :
86+ rules :
87+ - host : {{external_ip}}
88+ http :
89+ paths :
90+ - path : /apple
91+ pathType : Prefix
92+ backend :
93+ service :
94+ name : apple-service
95+ port :
96+ number : 5678
97+ - path : /banana
98+ pathType : Prefix
99+ backend :
100+ service :
101+ name : banana-service
102+ port :
103+ number : 5678
104+
105+ ---
106+
107+ apiVersion : v1
108+ kind : Pod
109+ metadata :
110+ name : traffic-generator
111+ namespace : {{namespace}}
112+ spec :
113+ containers :
114+ - name : traffic-generator
115+ image : ellerbrock/alpine-bash-curl-ssl
116+ command : ["/bin/bash"]
117+ args : ["-c", "while :; do curl http://{{external_ip}}/apple > /dev/null 2>&1; curl http://{{external_ip}}/banana > /dev/null 2>&1; sleep 1; done"]
118+ resources :
119+ limits :
120+ cpu : 100m
121+ memory : 100Mi
122+ requests :
123+ cpu : 50m
124+ memory : 50Mi
You can’t perform that action at this time.
0 commit comments