Browse Source

Add webserver

Francois Deppierraz 1 year ago
parent
commit
033a722d17
2 changed files with 25 additions and 0 deletions
  1. 7 0
      deploy.yaml
  2. 18 0
      service.yaml

+ 7 - 0
deploy.yaml

@@ -30,6 +30,13 @@ spec:
           name: data
         - mountPath: /code
           name: code
+      - image: nginx
+        name: webserver
+        ports:
+          - containerPort: 80
+        volumeMounts:
+        - mountPath: /usr/share/nginx/html
+          name: data
       volumes:
       - persistentVolumeClaim:
           claimName: power-monitoring-data

+ 18 - 0
service.yaml

@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: Service
+metadata:
+  creationTimestamp: null
+  labels:
+    app: power-monitoring
+  name: power-monitoring
+  namespace: power-monitoring
+spec:
+  ports:
+  - port: 80
+    protocol: TCP
+    targetPort: 80
+  selector:
+    app: power-monitoring
+  type: LoadBalancer
+status:
+  loadBalancer: {}