0
0
Kubernetesdevops~10 mins

A/B testing with Ingress 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 specify the Ingress API version.

Kubernetes
apiVersion: networking.k8s.io/[1]
kind: Ingress
metadata:
  name: example-ingress
Drag options to blanks, or click blank then click option'
Av1
Bv1beta1
Cv2
Dv1alpha1
Attempts:
3 left
💡 Hint
Common Mistakes
Using deprecated API versions like v1beta1 causes errors.
2fill in blank
medium

Complete the code to define the host for the Ingress rule.

Kubernetes
spec:
  rules:
  - host: [1]
    http:
      paths:
Drag options to blanks, or click blank then click option'
Alocalhost
Bmyapp.local
Ctest.ingress
Dexample.com
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid host names or IP addresses here.
3fill in blank
hard

Fix the error in the path type specification for Ingress.

Kubernetes
      paths:
      - path: /[1]
        pathType: Prefix
        backend:
          service:
            name: service-v1
            port:
              number: 80
Drag options to blanks, or click blank then click option'
Av2
Bv1
Cv1beta1
Dv1alpha1
Attempts:
3 left
💡 Hint
Common Mistakes
Using API version strings instead of URL path segments.
4fill in blank
hard

Fill both blanks to route traffic to the correct service and port for version 2.

Kubernetes
      - path: /[1]
        pathType: Prefix
        backend:
          service:
            name: [2]
            port:
              number: 8080
Drag options to blanks, or click blank then click option'
Av2
Bservice-v2
Cservice-v1
Dv1
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing service names and paths between versions.
5fill in blank
hard

Fill all three blanks to complete the Ingress rule for A/B testing with two services.

Kubernetes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ab-testing-ingress
spec:
  rules:
  - host: [1]
    http:
      paths:
      - path: /[2]
        pathType: Prefix
        backend:
          service:
            name: [3]
            port:
              number: 80
Drag options to blanks, or click blank then click option'
Aexample.com
Bv1
Cservice-v1
Dv2
Attempts:
3 left
💡 Hint
Common Mistakes
Using mismatched paths and service names.