apiVersion: v1 kind: Service metadata: name: hostname-service spec: selector: app: traefik ports: - protocol: TCP port: 80 targetPort: 8000 name: web --- apiVersion: extensions/v1beta1 kind: Ingress metadata: name: hostname-ingress annotations: kubernetes.io/ingress.class: traefik spec: rules: - host: 77a68ffc-1042-4c12-ba1d-d5964ba38688.k8s.civo.com http: paths: - backend: serviceName: hostname-service servicePort: 80 --- apiVersion: apps/v1 kind: Deployment metadata: labels: app: traefik name: hostname spec: replicas: 1 selector: matchLabels: app: traefik strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: traefik spec: containers: - name: hostname-app image: ruanbekker/hostname:latest imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 httpGet: path: / port: 8000 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 2 ports: - containerPort: 8000 name: http protocol: TCP readinessProbe: failureThreshold: 1 httpGet: path: / port: 8000 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 2 resources: {} dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler terminationGracePeriodSeconds: 30