@@ -265,33 +265,77 @@ You can get the sample bookinfo application manifest from **[this link](https://
265
265
266
266
After editing the manifest, apply it in a newly created namespace.
267
267
268
- ** ` kubectl apply -f bookinfo.yaml -n <namespace_name> ` **
268
+ ``` shellsession
269
+ kubectl apply -f bookinfo.yaml -n <namespace_name>
270
+ ```
269
271
270
272
Verify all workloads and services you just deployed are running and up.
271
273
272
- ** ` kubectl get all -n <namespace_name> ` **
274
+ ``` shellsession
275
+ kubectl get all -n <namespace_name>
276
+ ```
273
277
274
278
You will get output as shown below if everything is working fine.
275
279
276
- ![ ] ( /img/bookinfo-all-pods.png )
280
+ ``` shellsession
281
+ k8s-spiffe-integ-master-7j7fh-m67q9:~ kubectl get all -n bookinfo
282
+ NAME READY STATUS RESTARTS AGE
283
+ pod/details-v1-f8957ccb4-7vdgw 2/2 Running 0 37d
284
+ pod/productpage-v1-cfb4bc854-5km2l 2/2 Running 0 37d
285
+ pod/ratings-v1-65cd6fbcd8-s9jnc 2/2 Running 0 37d
286
+ pod/reviews-v1-55f769fb78-czh7j 2/2 Running 0 37d
287
+ pod/reviews-v2-6b7c798cc8-wkpxg 2/2 Running 0 37d
288
+ pod/reviews-v3-695c7f59db-nzwwk 2/2 Running 2 (34d ago) 37d
289
+
290
+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
291
+ service/details ClusterIP 10.111.38.161 <none> 9080/TCP 37d
292
+ service/productpage ClusterIP 10.102.189.161 <none> 9080/TCP 37d
293
+ service/ratings ClusterIP 10.105.7.153 <none> 9080/TCP 37d
294
+ service/reviews ClusterIP 10.106.49.246 <none> 9080/TCP 37d
295
+
296
+ NAME READY UP-TO-DATE AVAILABLE AGE
297
+ deployment.apps/details-v1 1/1 1 1 37d
298
+ deployment.apps/productpage-v1 1/1 1 1 37d
299
+ deployment.apps/ratings-v1 1/1 1 1 37d
300
+ deployment.apps/reviews-v1 1/1 1 1 37d
301
+ deployment.apps/reviews-v2 1/1 1 1 37d
302
+ deployment.apps/reviews-v3 1/1 1 1 37d
303
+
304
+ NAME DESIRED CURRENT READY AGE
305
+ replicaset.apps/details-v1-f8957ccb4 1 1 1 37d
306
+ replicaset.apps/productpage-v1-cfb4bc854 1 1 1 37d
307
+ replicaset.apps/ratings-v1-65cd6fbcd8 1 1 1 37d
308
+ replicaset.apps/reviews-v1-55f769fb78 1 1 1 37d
309
+ replicaset.apps/reviews-v2-6b7c798cc8 1 1 1 37d
310
+ replicaset.apps/reviews-v3-695c7f59db 1 1 1 37d
311
+
312
+ ```
277
313
278
314
Once everything is up, all workloads would get registered under SPIRE server.
279
315
280
316
** 4.6** You can verify the registration of workloads using the following command:
281
317
282
- ** ` kubectl exec <spire-server_pod_name> -n spire -c spire-server -- ./bin/spire-server entry show ` **
318
+ ``` shellsession
319
+ kubectl exec <spire-server_pod_name> -n spire -c spire-server -- ./bin/spire-server entry show
320
+ ```
283
321
284
322
Verify that every workload with same label as clusterSPIFFEID CRD’s match label is registered in the server.
285
323
286
324
![ ] ( /img/server-entries.png )
287
325
288
326
** 4.7** Verify that the certificate issuer of workloads is SPIRE using following commands for each workload.
289
327
290
- ** ` istioctl proxy-config secret <pod_name> -n <namespace_name> -o json | jq -r '.dynamicActiveSecrets[0].secret.tlsCertificate.certificateChain.inlineBytes' | base64 --decode > chain.pem ` **
328
+ ``` shellsession
329
+ istioctl proxy-config secret <pod_name> -n <namespace_name> -o json | jq -r '.dynamicActiveSecrets[0].secret.tlsCertificate.certificateChain.inlineBytes' | base64 --decode > chain.pem
330
+ ```
331
+
332
+ ``` shellsession
333
+ k8s-spiffe-integ-master-7j7fh-m67q9:~ openssl x509 -in chain.pem -text | grep SPIRE
334
+ Subject: C = US, O = SPIRE, x500UniqueIdentifier = e2f9c35b9198e1824373e874b13287d0
335
+
336
+ ```
291
337
292
- ** ` openssl x509 -in chain.pem -text | grep SPIRE ` **
293
338
294
- ![ ] ( /img/spire-verify.png )
295
339
296
340
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.
297
341
@@ -301,13 +345,20 @@ The Bookinfo application is deployed but not accessible from the outside. To mak
301
345
302
346
** 5.1** Associate this application with the Istio gateway:
303
347
304
- ** ` kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml -n bookinfo ` **
348
+ ``` shellsession
349
+ kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml -n bookinfo
350
+ ```
305
351
306
352
** 5.2** Ensure that there are no issues with the configuration:
307
353
308
- ** ` istioctl analyze -n bookinfo ` **
354
+ ```
355
+ k8s-spiffe-integ-master-7j7fh-m67q9:~ # istioctl analyze -n bookinfo
356
+
357
+ ✔ No validation issues found when analyzing namespace: bookinfo.
358
+
359
+ ```
360
+
309
361
310
- ![ ] ( /img/bookinfo-analyze.png )
311
362
312
363
** 5.3** Execute the following command to determine if your Kubernetes cluster is running in an environment that supports external load balancers:
313
364
0 commit comments