underyx-me.yml 1.7 KB
Newer Older
Bence Nagy's avatar
Bence Nagy committed
1 2 3 4 5 6 7 8
kind: Deployment
apiVersion: apps/v1beta2
metadata:
  name: underyx-me
  namespace: public
  labels:
    app: underyx.me
spec:
9
  replicas: 2
Bence Nagy's avatar
Bence Nagy committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  selector:
    matchLabels:
      app: underyx.me
  template:
    metadata:
      labels:
        app: underyx.me
    spec:
      containers:
      - name: app
        image: underyx/underyx.me
        ports:
        - containerPort: 80
        livenessProbe:
          httpGet:
            port: 80
          initialDelaySeconds: 30
          periodSeconds: 30
28 29 30 31 32 33 34
        resources:
          limits:
            cpu: 50m
            memory: 32Mi
          requests:
            cpu: 10m
            memory: 2Mi
Bence Nagy's avatar
Bence Nagy committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
---
kind: Service
apiVersion: v1
metadata:
  name: underyx-me-svc
  namespace: public
spec:
  ports:
    - port: 80
      targetPort: 80
  selector:
    app: underyx.me
---
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
  name: underyx-me-cert
  namespace: public
  labels:
    app: underyx.me
spec:
  secretName: underyx-me-tls
  issuerRef:
    kind: ClusterIssuer
    name: letsencrypt
  commonName: underyx.me
  dnsNames:
  - underyx.me
  - www.underyx.me
  acme:
    config:
    - http01:
        ingressClass: nginx
      domains:
      - underyx.me
      - www.underyx.me
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: underyx-me-ingress
  namespace: public
spec:
  rules:
  - host: underyx.me
    http:
      paths:
      - backend:
          serviceName: underyx-me-svc
          servicePort: 80
        path: /
  - host: www.underyx.me
    http:
      paths:
      - backend:
          serviceName: underyx-me-svc
          servicePort: 80
        path: /
  tls:
  - hosts:
    - underyx.me
    - www.underyx.me
    secretName: underyx-me-tls