diff --git a/first-app/helloworld-service.yml b/first-app/helloworld-service.yml new file mode 100644 index 0000000..9b34666 --- /dev/null +++ b/first-app/helloworld-service.yml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: helloworld-service +spec: + ports: + - port: 80 + targetPort: nodejs-port + protocol: TCP + selector: + app: helloworld + type: LoadBalancer diff --git a/first-app/helloworld.yml b/first-app/helloworld.yml index cc79f36..370222f 100644 --- a/first-app/helloworld.yml +++ b/first-app/helloworld.yml @@ -9,4 +9,5 @@ spec: - name: k8s-demo image: wardviaene/k8s-demo ports: - - containerPort: 3000 + - name: nodejs-port + containerPort: 3000