Hi Guys, this is regarding q1 in Mock2. Could somebody tell me what is wrong wit . . .

Anish Nagaraj:
Hi Guys, this is regarding q1 in Mock2. Could somebody tell me what is wrong with this svc definition? The question is “Create a deployment called my-webapp with image: nginx, label tier:frontend and 2 replicas. Expose the deployment as a NodePort service with name front-end-service , port: 80 and NodePort: 30083

apiVersion: v1kind: Service
metadata:
  creationTimestamp: null
  labels:
    tier: frontend
  name: my-webapp
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 30083
  selector:
    tier: frontend
  type: NodePort
status:
  loadBalancer: {}

Basavraj Nilkanthe:
you have not configured nodePort in ports section

Anish Nagaraj:
Got it! Thank you :slightly_smiling_face:

Priti Talukder:
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
tier: frontend
name: my-webapp
spec:
ports:

  • port: 80
    nodePort: 30083
    protocol: TCP
    selector:
    tier: frontend
    type: NodePort
    status:
    loadBalancer: {}