Study. uk . com
  1. Home
  2. All questions
  3. Question 212

CKA study material · question 212 of 1000

What form do the environment variables the kubelet injects for a Service named redis-primary take?

  1. KUBE_REDIS_PRIMARY_ADDR
  2. redis-primary_HOST and redis-primary_PORT
  3. SERVICE_REDIS_PRIMARY_IP
  4. REDIS_PRIMARY_SERVICE_HOST and REDIS_PRIMARY_SERVICE_PORT
Show the answer

Answer: D. REDIS_PRIMARY_SERVICE_HOST and REDIS_PRIMARY_SERVICE_PORT

The Service name is upper-cased with dashes turned into underscores, followed by _SERVICE_HOST and _SERVICE_PORT.

Source: Service (Kubernetes) — Environment variables

Challenge yourself on this topic → Study as cards