Kubernetes showing maintenance container if main container dies

Hey!

I am using traefik and have it routing my html website container.
I want to deploy another container also (maintenance) and have it show if the main container goes down.
I understand that I will deploy the maintenance container but how should I alter my service to show the maintenance one if the main ones goes down?

serivce:


apiVersion: v1
kind: Service
metadata:
  namespace: application
  name: 'application-website'
spec:
  type: ClusterIP
  ports:
    - protocol: TCP
      name: http
      port: 80
      targetPort: 80
    - protocol: TCP
      name: https
      port: 443
      targetPort: 80
  selector:
    app: 'application-website'

app:


apiVersion: apps/v1
kind: ReplicaSet
metadata:
  namespace: application
  name: 'application-website'
  labels:
    app: 'application-website'
    tier: 'frontend'
spec:
  replicas: 1
  selector:
    matchLabels:
      app: 'application-website'
  template:
    metadata:
      labels:
        app: 'application-website'
    spec:
      containers:
      - name: application-website-container
        image: richarvey/nginx-php-fpm:1.10.3 
        imagePullPolicy: Always
        env:
          - name: SSH_KEY
            value: 'ssh'
          - name: GIT_REPO
            value: 'repo-location'
          - name: GIT_EMAIL
            value: 'email'
          - name: GIT_NAME
            value: 'username'
        ports:
        - containerPort: 80

my traefik spec part of my ingress route file:


spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`example.com`)
      kind: Rule
      services:
        - name: application-website
          namespace: application
          port: 80

Is there some middleware that can help with this?