diff --git a/svc/svctypes b/svc/svctypes new file mode 100644 index 0000000..07259f4 --- /dev/null +++ b/svc/svctypes @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: Service +metadata: + name: mynginxservice +spec: + selector: + app: mynginx + ports: + - name: name-of-service-port + protocol: TCP + port: 80 + targetPort: http-web-svc + +---------------------------------------------------- + +apiVersion: v1 +kind: Service +metadata: + name: mynginxlbsvc +spec: + selector: + app: mynginx + ports: + - protocol: TCP + port: 80 + targetPort: 80 + + type: LoadBalancer + +------------------------------------------------ + + +apiVersion: v1 +kind: Service +metadata: + name: mynginxnodeportsvc +spec: + type: NodePort + selector: + app: mynginx + ports: + # By default and for convenience, the `targetPort` is set to the same value as the `port` field. + - port: 80 + targetPort: 80 + + nodePort: 30007