From d3ab17f61d7e4fc2a643ef6120785c5728b63667 Mon Sep 17 00:00:00 2001 From: mnagen Date: Thu, 22 Sep 2022 13:28:20 +0530 Subject: [PATCH] Create svctypes --- svc/svctypes | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 svc/svctypes 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