Thanks for the quick fix and the pods are in running status. However, the validation of the question is getting failed through i set the exact values for nodeport.
The question is
2) Create a Service for jenkins deployment. Service name should be jenkins-service under jenkins namespace, type should be NodePort, targetport should be 8080 and nodePort should be 30008
and here are my console output (Attached the screenshot)
thor@jump_host / kubectl get pods -n jenkins
NAME READY STATUS RESTARTS AGE
jenkins-deployment-8544cd5d84-wh9kt 1/1 Running 0 117s
thor@jump_host / thor@jump_host / kubctl get svc jenkins-service -n jenkins
bash: kubctl: command not found
thor@jump_host / kubectl get svc jenkins-service -n jenkins
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
jenkins-service NodePort 10.107.97.85 8080:30088/TCP 2m50s
thor@jump_host /$ kubectl describe svc jenkins-service -n jenkins
Name: jenkins-service
Namespace: jenkins
Labels: app=jenkins
Annotations:
Selector: app=jenkins
Type: NodePort
IP: 10.107.97.85
Port: 8080/TCP
TargetPort: 8080/TCP
NodePort: 30088/TCP
Endpoints: 10.44.0.1:8080
Session Affinity: None
External Traffic Policy: Cluster
Events: