0
0
Kubernetesdevops~10 mins

Why service mesh matters in Kubernetes - Test Your Understanding

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

Complete the code to deploy a simple service in Kubernetes.

Kubernetes
kubectl create deployment myapp --image=[1]
Drag options to blanks, or click blank then click option'
Amysql
Bnginx
Credis
Dpostgres
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a database image instead of a web server.
2fill in blank
medium

Complete the command to expose the deployment as a service.

Kubernetes
kubectl expose deployment myapp --type=[1] --port=80
Drag options to blanks, or click blank then click option'
ALoadBalancer
BClusterIP
CNodePort
DExternalName
Attempts:
3 left
💡 Hint
Common Mistakes
Using ClusterIP which only exposes service inside the cluster.
3fill in blank
hard

Fix the error in the service mesh sidecar injection command.

Kubernetes
kubectl label namespace default istio-injection=[1]
Drag options to blanks, or click blank then click option'
Aenabled
Bdisable
Coff
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'off' or 'disable' which turns injection off.
4fill in blank
hard

Fill both blanks to create a service mesh policy that allows traffic only from a specific service.

Kubernetes
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: allow-specific
  namespace: default
spec:
  selector:
    matchLabels:
      app: [1]
  rules:
  - from:
    - source:
        principals: ["[2]"]
Drag options to blanks, or click blank then click option'
Areviews
Bratings
Ccluster.local/ns/default/sa/reviews
Dcluster.local/ns/default/sa/ratings
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing labels and principals incorrectly.
5fill in blank
hard

Fill all three blanks to define a traffic routing rule in Istio VirtualService.

Kubernetes
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: myapp
spec:
  hosts:
  - myapp.example.com
  http:
  - route:
    - destination:
        host: [1]
        subset: [2]
      weight: [3]
Drag options to blanks, or click blank then click option'
Amyapp
Bv1
C80
Dv2
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong subset or weight values.