nerdexam
Linux_Foundation

CKA · Question #58

Reconfigure the existing Deployment front-end in namespace spline-reticulator to expose port 80/tcp of the existing container nginx. Create a new Service named front-end-svc to expose the individual…

Task Summary SSH into cka000022 Modify an existing Deployment: Namespace: spline-reticulator Deployment: front-end Container: nginx Expose: port 80/tcp Create a Service: Name: front-end-svc Type: NodePort Port: 80 → container port 80 ssh cka000022 kubectl edit deployment…

Submitted by fatima_kr· May 4, 2026Services & Networking

Question

Reconfigure the existing Deployment front-end in namespace spline-reticulator to expose port 80/tcp of the existing container nginx. Create a new Service named front-end-svc to expose the individual Pods of this deployment via a NodePort.

Exhibit

CKA question #58 exhibit

Explanation

Task Summary SSH into cka000022 Modify an existing Deployment: Namespace: spline-reticulator Deployment: front-end Container: nginx Expose: port 80/tcp Create a Service: Name: front-end-svc Type: NodePort Port: 80 → container port 80

ssh cka000022 kubectl edit deployment front-end -n spline-reticulator

Under containers: -> nginx, add this if not present:

ports:

- containerPort: 80

protocol: TCP

Verify deployment labels if needed:

kubectl get deployment front-end -n spline-reticulator -o yaml | grep labels -A 2

cat <<EOF > front-end-svc.yaml apiVersion: v1 kind: Service metadata: name: front-end-svc namespace: spline-reticulator spec: type: NodePort selector: app: front-end ports:

  • port: 80 targetPort: 80 protocol: TCP EOF kubectl apply -f front-end-svc.yaml kubectl get svc front-end-svc -n spline-reticulator

Topics

#Deployments#Services#NodePort#Container exposure

Community Discussion

No community discussion yet for this question.

Full CKA Practice