@@ -17,7 +17,7 @@ The controller will run inside the Linkerd mesh.
17
17
18
18
Create a namespace with linkerd injection enabled:
19
19
20
- ``` yaml
20
+ ``` yaml{5}
21
21
apiVersion: v1
22
22
kind: Namespace
23
23
metadata:
@@ -29,7 +29,7 @@ metadata:
29
29
30
30
Create a Helm release to install the NGINX ingress controller:
31
31
32
- ` ` ` yaml
32
+ ``` yaml{7}
33
33
apiVersion: helm.fluxcd.io/v1
34
34
kind: HelmRelease
35
35
metadata:
@@ -77,7 +77,7 @@ You'll be installing podinfo using a Helm chart stored in the git repository at
77
77
78
78
Create the ` prod ` namespace with linkerd injection enabled:
79
79
80
- ``` yaml
80
+ ``` yaml{5}
81
81
apiVersion: v1
82
82
kind: Namespace
83
83
metadata:
@@ -87,9 +87,10 @@ metadata:
87
87
name: prod
88
88
```
89
89
90
- Create a Helm release to install the podinfo chart (replace ` GHUSER` with your GitHub username):
90
+ Create a Helm release to install the podinfo chart
91
+ (replace ` GHUSER ` with your GitHub username and ` LB-PUBLIC-IP ` with your ingress IP):
91
92
92
- ` ` ` yaml
93
+ ``` yaml{7,11,31}
93
94
apiVersion: helm.fluxcd.io/v1
94
95
kind: HelmRelease
95
96
metadata:
@@ -118,6 +119,15 @@ spec:
118
119
proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:9898;
119
120
proxy_hide_header l5d-remote-ip;
120
121
proxy_hide_header l5d-server-id;
122
+ path: /
123
+ hosts:
124
+ - LB-PUBLIC-IP.nip.io
125
+ ```
126
+
127
+ Note that if you are on EKS, the host should be set to the ` elb.amazonaws.com ` address:
128
+
129
+ ``` sh
130
+ kubectl ingress-nginx get svc | grep Ingress
121
131
```
122
132
123
133
Apply changes:
@@ -135,7 +145,7 @@ Validate that the Helm operator has installed podinfo:
135
145
kubectl -n prod get hr
136
146
```
137
147
138
- Open your browser and navigate to `http://< LB-IP> /`, you should see podinfo v3.0.0 UI.
148
+ Open your browser and navigate to ` http://LB-PUBLIC-IP.nip.io / ` , you should see podinfo v3.0.0 UI.
139
149
140
150
![ podinfo] ( /podinfo-3.0.0.png )
141
151
@@ -157,15 +167,12 @@ metadata:
157
167
fluxcd.io/tag.chart-image: semver:~3.0
158
168
```
159
169
160
- Commit and push the changes to GitHub :
161
-
162
- ` ` ` sh
163
- git add -A && git commit -m "automate podinfo" && git push origin master
164
- ` ` `
165
-
166
- Sync the the changes on the cluster :
170
+ Apply changes:
167
171
168
172
``` sh
173
+ git add -A && \
174
+ git commit -m " automate podinfo" && \
175
+ git push origin master && \
169
176
fluxctl sync
170
177
```
171
178
@@ -181,7 +188,7 @@ Pull the changes made by Flux locally:
181
188
git pull origin master
182
189
```
183
190
184
- Open your browser and navigate to `http://< LB-IP> /`, you should see podinfo v3.0.5 UI.
191
+ Open your browser and navigate to ` http://LB-PUBLIC-IP.nip.io / ` , you should see podinfo v3.0.5 UI.
185
192
186
193
![ podinfo] ( /podinfo-3.0.5.png )
187
194
@@ -194,7 +201,7 @@ The sealed secret can be decrypted only by the controller running in your cluste
194
201
195
202
Create the Sealed Secrets Helm release:
196
203
197
- ` ` ` yaml
204
+ ``` yaml{7}
198
205
apiVersion: helm.fluxcd.io/v1
199
206
kind: HelmRelease
200
207
metadata:
@@ -207,7 +214,7 @@ spec:
207
214
chart:
208
215
repository: https://kubernetes-charts.storage.googleapis.com/
209
216
name: sealed-secrets
210
- version: 1.3.4
217
+ version: 1.4.0
211
218
```
212
219
213
220
Apply changes:
@@ -241,7 +248,7 @@ kubeseal --fetch-cert \
241
248
You can generate a Kubernetes secret locally with kubectl and encrypt it with kubeseal:
242
249
243
250
``` sh
244
- kubectl -n dev create secret generic basic-auth \
251
+ kubectl -n prod create secret generic basic-auth \
245
252
--from-literal=user=admin \
246
253
--from-literal=password=admin \
247
254
--dry-run \
@@ -258,7 +265,8 @@ then decrypt it into a Kubernetes secret.
258
265
To prepare for disaster recovery you should backup the Sealed Secrets controller private key with:
259
266
260
267
``` sh
261
- kubectl get secret -n fluxcd sealed-secrets-key -o yaml --export > sealed-secrets-key.yaml
268
+ kubectl get secret -n fluxcd sealed-secrets-key -o yaml \
269
+ --export > sealed-secrets-key.yaml
262
270
```
263
271
264
272
To restore from backup after a disaster, replace the newly-created secret and restart the controller:
0 commit comments