0
0
Azurecloud~10 mins

AKS with Azure Load Balancer - Interactive Code Practice

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

Complete the code to create an Azure Load Balancer service type in AKS.

Azure
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: [1]
  selector:
    app: my-app
  ports:
  - protocol: TCP
    port: 80
    targetPort: 80
Drag options to blanks, or click blank then click option'
AClusterIP
BLoadBalancer
CNodePort
DExternalName
Attempts:
3 left
💡 Hint
Common Mistakes
Using ClusterIP will only expose the service inside the cluster.
NodePort exposes the service on a port on each node but does not create a cloud load balancer.
2fill in blank
medium

Complete the command to create an AKS cluster with a managed Azure Load Balancer.

Azure
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 3 --enable-addons [1] --generate-ssh-keys
Drag options to blanks, or click blank then click option'
Amonitoring
Bazure-policy
Chttp_application_routing
Dload-balancer
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing monitoring addon with load balancer functionality.
Using a non-existent addon name.
3fill in blank
hard

Fix the error in the YAML to correctly expose the service via Azure Load Balancer.

Azure
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: [1]
  ports:
  - port: 80
    targetPort: 80
  selector:
    app: my-app
Drag options to blanks, or click blank then click option'
ALoadBalancer
BExternalName
CClusterIP
DNodePort
Attempts:
3 left
💡 Hint
Common Mistakes
Using ClusterIP will not expose the service outside the cluster.
ExternalName is for DNS aliasing, not load balancing.
4fill in blank
hard

Fill both blanks to define a readiness probe for pods behind the Azure Load Balancer.

Azure
readinessProbe:
  httpGet:
    path: [1]
    port: [2]
  initialDelaySeconds: 5
  periodSeconds: 10
Drag options to blanks, or click blank then click option'
A/healthz
B8080
C80
D/status
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-existent path for readiness probe.
Using the wrong port that does not match the container port.
5fill in blank
hard

Fill all three blanks to configure the Azure Load Balancer frontend IP and backend pool in the ARM template snippet.

Azure
"resources": [
  {
    "type": "Microsoft.Network/loadBalancers",
    "name": "myLoadBalancer",
    "properties": {
      "frontendIPConfigurations": [
        {
          "name": [1],
          "properties": {
            "publicIPAddress": {
              "id": [2]
            }
          }
        }
      ],
      "backendAddressPools": [
        {
          "name": [3]
        }
      ]
    }
  }
]
Drag options to blanks, or click blank then click option'
A"LoadBalancerFrontEnd"
B"/subscriptions/xxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/myPublicIP"
C"LoadBalancerBackEnd"
D"myPublicIP"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the public IP name instead of its resource ID.
Mismatching frontend and backend pool names.