Skip to content

Instantly share code, notes, and snippets.

@raj1rana
Created May 20, 2022 08:32
Show Gist options
  • Save raj1rana/c8bc72df60a3dc04fc6c8d59f7403b2d to your computer and use it in GitHub Desktop.
Save raj1rana/c8bc72df60a3dc04fc6c8d59f7403b2d to your computer and use it in GitHub Desktop.
create service nodeport

to create NodePort service below is the simple snippet to get you started

apiVersion: v1
kind: Service
metadata:
  name: wordpress-service
spec:
  type: NodePort
  selector:
     type: webapp   # this is the label of your pod. 
  ports:
    - port: 80
      targetPort: 80
      nodePort: 30007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment