0
0
Kubernetesdevops~10 mins

Observability with service mesh in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to label the namespace for Istio injection.

Kubernetes
kubectl label namespace [1] istio-injection=enabled
Drag options to blanks, or click blank then click option'
Amyapp
Bdefault
Ckube-system
Distio-system
Attempts:
3 left
💡 Hint
Common Mistakes
Labeling the wrong namespace so sidecars are not injected.
Using 'istio-system' namespace which is for Istio components only.
2fill in blank
medium

Complete the command to check the status of Istio pods in the istio-system namespace.

Kubernetes
kubectl get pods -n [1]
Drag options to blanks, or click blank then click option'
Adefault
Bmyapp
Cistio-system
Dkube-system
Attempts:
3 left
💡 Hint
Common Mistakes
Checking pods in the wrong namespace and not seeing Istio pods.
Using 'myapp' namespace which is for application pods.
3fill in blank
hard

Fix the error in the command to view logs of the Istio proxy sidecar container named 'istio-proxy' in pod 'myapp-123'.

Kubernetes
kubectl logs myapp-123 -c [1]
Drag options to blanks, or click blank then click option'
Aistio-proxy
Bsidecar
Cproxy
Denvoy
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect container names causing 'container not found' errors.
Confusing 'envoy' with the container name.
4fill in blank
hard

Fill both blanks to create a ServiceEntry resource that allows external access to example.com on port 80.

Kubernetes
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: example-external
spec:
  hosts:
  - [1]
  ports:
  - number: [2]
    name: http
    protocol: HTTP
Drag options to blanks, or click blank then click option'
Aexample.com
B443
C80
Dexternal.com
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong host names or ports like 443 for HTTP.
Confusing port numbers for HTTPS and HTTP.
5fill in blank
hard

Fill all three blanks to create a VirtualService that routes traffic to service 'reviews' on port 9080 with prefix '/v1'.

Kubernetes
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: reviews-route
spec:
  hosts:
  - [1]
  http:
  - match:
    - uri:
        prefix: [2]
    route:
    - destination:
        host: [3]
        port:
          number: 9080
Drag options to blanks, or click blank then click option'
Areviews
B/v1
Creviews.default.svc.cluster.local
D/v2
Attempts:
3 left
💡 Hint
Common Mistakes
Using short host names in 'hosts' instead of full DNS names.
Mixing up URI prefixes or destination hosts.