0
0
Kubernetesdevops~10 mins

ExternalName service type in Kubernetes - Interactive Code Practice

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

Complete the YAML to define a Kubernetes Service of type ExternalName.

Kubernetes
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: [1]
  externalName: example.com
Drag options to blanks, or click blank then click option'
AExternalName
BLoadBalancer
CNodePort
DClusterIP
Attempts:
3 left
💡 Hint
Common Mistakes
Using ClusterIP instead of ExternalName will create a normal internal service.
Using NodePort or LoadBalancer will expose pods, not map to external DNS.
2fill in blank
medium

Complete the YAML to specify the external DNS name for the ExternalName service.

Kubernetes
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: ExternalName
  externalName: [1]
Drag options to blanks, or click blank then click option'
A10.0.0.1
Bmy-service.local
Cexample.com
Dmy-service.default.svc.cluster.local
Attempts:
3 left
💡 Hint
Common Mistakes
Using an IP address instead of a DNS name.
Using internal cluster service names instead of external DNS.
3fill in blank
hard

Fix the error in this ExternalName service YAML by completing the missing field.

Kubernetes
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  type: ExternalName
  [1]: example.com
Drag options to blanks, or click blank then click option'
Aselector
BclusterIP
Cports
DexternalName
Attempts:
3 left
💡 Hint
Common Mistakes
Adding a selector field which is not used for ExternalName services.
Adding ports which are ignored for ExternalName services.
4fill in blank
hard

Fill both blanks to create a valid ExternalName service YAML with correct type and externalName.

Kubernetes
apiVersion: v1
kind: Service
metadata:
  name: external-service
spec:
  type: [1]
  externalName: [2]
Drag options to blanks, or click blank then click option'
AExternalName
BClusterIP
Cexample.org
D10.10.10.10
Attempts:
3 left
💡 Hint
Common Mistakes
Using ClusterIP as type for ExternalName service.
Using an IP address instead of a DNS name for externalName.
5fill in blank
hard

Fill all three blanks to define an ExternalName service with name, type, and externalName fields.

Kubernetes
apiVersion: v1
kind: Service
metadata:
  name: [1]
spec:
  type: [2]
  externalName: [3]
Drag options to blanks, or click blank then click option'
Aexternal-service
BExternalName
Cexternal.example.com
Dmy-service
Attempts:
3 left
💡 Hint
Common Mistakes
Using internal service names for externalName.
Using wrong service type other than ExternalName.