@@ -74,20 +74,15 @@ Verify installation of SPIRE by checking if all pods are running and containers
74
74
75
75
Use the command given below, and you will get the output as shown.
76
76
77
- ** ` kubectl get pods -n spire ` **
78
-
79
77
``` shellsession
80
78
k8s-spiffe-integ-master-7j7fh-m67q9:~ kubectl get pods -n spire
81
79
NAME READY STATUS RESTARTS AGE
82
80
spire-agent-5tlck 3/3 Running 2 (31d ago) 31d
83
81
spire-agent-gnwbj 3/3 Running 1 (31d ago) 31d
84
82
spire-agent-mghnw 3/3 Running 2 (31d ago) 31d
85
83
spire-server-574474c7dc-42kln 2/2 Running 4 (4d1h ago) 31d
86
-
87
84
```
88
85
89
-
90
-
91
86
### Step 3: Install Istio
92
87
93
88
1 . #### Download the latest release:
@@ -162,11 +157,8 @@ istio-ingressgateway-6448bcfb6-d7gcw 1/1 Running 0 31d
162
157
istiod-d5bc8669c-jhstc 1/1 Running 0 31d
163
158
kiali-648847c8c4-h5nmh 1/1 Running 0 31d
164
159
prometheus-7b8b9dd44c-s76kc 2/2 Running 0 31d
165
-
166
160
```
167
161
168
-
169
-
170
162
#### Step 4: Deploying Sample Application
171
163
172
164
Now that our SPIRE and Istio are integrated, the identities to workloads must be issued by SPIRE.
@@ -221,7 +213,6 @@ spec:
221
213
- kubernetes
222
214
status :
223
215
phase : Active
224
-
225
216
` ` `
226
217
227
218
**4.4** Create and apply a ClusterSPIFFEID CRD with namespace selector.
@@ -238,7 +229,6 @@ spec:
238
229
namespaceSelector :
239
230
matchLabels :
240
231
spiffe.io/spire-managed-identity : " true"
241
-
242
232
` ` `
243
233
244
234
After editing your clusterSPIFFEID, apply it using kubectl.
@@ -252,7 +242,6 @@ kubectl apply -f <your_clusterSPIFFEID_name>
252
242
``` yaml
253
243
annotations :
254
244
inject.istio.io/templates : " sidecar,spire"
255
-
256
245
` ` `
257
246
258
247
You can patch it to workload or just add this to your deployment manifest at **{spec:{template:{metadata:{ annotation:}}}}** as shown below.
@@ -308,7 +297,6 @@ replicaset.apps/ratings-v1-65cd6fbcd8 1 1 1 37d
308
297
replicaset.apps/reviews-v1-55f769fb78 1 1 1 37d
309
298
replicaset.apps/reviews-v2-6b7c798cc8 1 1 1 37d
310
299
replicaset.apps/reviews-v3-695c7f59db 1 1 1 37d
311
-
312
300
```
313
301
314
302
Once everything is up, all workloads would get registered under SPIRE server.
@@ -332,11 +320,8 @@ istioctl proxy-config secret <pod_name> -n <namespace_name> -o json | jq -r '.dy
332
320
``` shellsession
333
321
k8s-spiffe-integ-master-7j7fh-m67q9:~ openssl x509 -in chain.pem -text | grep SPIRE
334
322
Subject: C = US, O = SPIRE, x500UniqueIdentifier = e2f9c35b9198e1824373e874b13287d0
335
-
336
323
```
337
324
338
-
339
-
340
325
You should also check the same for ingress-gateway pod in Istio-system namespace and verify that your deployed workloads and ingress-gateway has the same issuer.
341
326
342
327
#### Step 5: Open the application outside traffic
@@ -355,22 +340,16 @@ kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml -n bookinfo
355
340
k8s-spiffe-integ-master-7j7fh-m67q9:~ # istioctl analyze -n bookinfo
356
341
357
342
✔ No validation issues found when analyzing namespace: bookinfo.
358
-
359
343
```
360
344
361
-
362
-
363
345
** 5.3** Execute the following command to determine if your Kubernetes cluster is running in an environment that supports external load balancers:
364
346
365
347
``` shellsession
366
348
k8s-spiffe-integ-master-7j7fh-m67q9:~ kubectl get svc istio-ingressgateway -n istio-system
367
349
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
368
350
istio-ingressgateway LoadBalancer 10.105.191.32 172.16.17.5 15021:30189/TCP,80:30392/TCP,443:30566/TCP 32d
369
-
370
351
```
371
352
372
-
373
-
374
353
If the EXTERNAL-IP value is set, your environment has an external load balancer; if not, then set the external load balancer first then follow further steps.
375
354
376
355
For this cluster we are using metallb.
@@ -406,7 +385,6 @@ istio-ingressgateway LoadBalancer 10.105.191.32 172.16.17.5 15021:30189/
406
385
istiod ClusterIP 10.101.27.65 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 32d
407
386
kiali LoadBalancer 10.103.14.197 172.16.17.6 20001:32116/TCP,9090:31950/TCP 32d
408
387
prometheus ClusterIP 10.98.101.102 <none> 9090/TCP 32d
409
-
410
388
```
411
389
412
390
![ ] ( /img/manual_proxy.png )
@@ -446,11 +424,8 @@ export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
446
424
``` shellsession
447
425
k8s-spiffe-integ-master-7j7fh-m67q9:~ echo "$GATEWAY_URL"
448
426
172.16.17.5:80
449
-
450
427
```
451
428
452
-
453
-
454
429
Curl into productpage using gateway URL using following command.
455
430
456
431
``` shellsession
@@ -466,12 +441,8 @@ k8s-spiffe-integ-master-7j7fh-m67q9:~ curl -v http://$GATEWAY_URL/productpage
466
441
> Accept: * /*
467
442
> Proxy-Connection: Keep-Alive
468
443
>
469
-
470
-
471
444
```
472
445
473
-
474
-
475
446
You can generate traffic on product page by just reaching out to shown http URL.
476
447
477
448
** Note:** Before reaching out to this page and kiali in further step, ensure that you have followed step 5.5 properly.
0 commit comments