kubernetes.yaml 988 Bytes
Newer Older
1 2 3
apiVersion: apps/v1
kind: Deployment
metadata:
4
  name: myapp
FabiusE's avatar
FabiusE committed
5
  namespace: default
6 7 8
spec:
  selector:
    matchLabels:
9
      app: myapp
10 11 12 13 14 15
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
16
      - name: myapp
FabiusE's avatar
FabiusE committed
17
        image: fabiuse/reactdocker:latest
18 19 20 21 22
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
FabiusE's avatar
FabiusE committed
23
        - containerPort: 80
24 25 26 27
---
apiVersion: v1
kind: Service
metadata:
FabiusE's avatar
FabiusE committed
28
  name: myapp
FabiusE's avatar
FabiusE committed
29
  namespace: default
FabiusE's avatar
FabiusE committed
30 31
  labels:
    app: myapp
32 33
spec:
  ports:
FabiusE's avatar
FabiusE committed
34 35 36 37
  - port: 80
    protocol: TCP
  selector:
    app: myapp
38
---
FabiusE's avatar
FabiusE committed
39
apiVersion: networking.k8s.io/v1beta1
FabiusE's avatar
FabiusE committed
40
kind: Ingress
41
metadata:
FabiusE's avatar
FabiusE committed
42
  name: myapp
FabiusE's avatar
FabiusE committed
43
  namespace: default
44
spec:
FabiusE's avatar
FabiusE committed
45
  rules:
FabiusE's avatar
FabiusE committed
46
  - host: www.masterthesis.online
FabiusE's avatar
FabiusE committed
47 48 49
    http: 
      paths:
      - backend:
FabiusE's avatar
FabiusE committed
50 51
          serviceName: myapp
          servicePort: 80
FabiusE's avatar
FabiusE committed
52 53
        path: /
  tls:
FabiusE's avatar
FabiusE committed
54
  - hosts:
FabiusE's avatar
FabiusE committed
55
    - www.masterthesis.online
FabiusE's avatar
FabiusE committed
56
    secretName: testsecret-tls