Hey, everyone!
I've been trying to get a very basic configuration of Traefik running on DigitalOcean Kubernetes. While it seems like I can get it running, every page I try to visit returns 404. I was hoping to get some help here.
Here are the steps I'm taking:
- Create a Kubernetes cluster with two nodes from the DigitalOcean dashboard version (
1.16.6-do.2
) - Run
doctl kubernetes cluster kubeconfig save <cluster name>
to savekubectl
configuration - With Helm
3.1.2
, Runhelm repo add traefik https://containous.github.io/traefik-helm-chart
- Run
helm repo update
- Run
helm install traefik traefik/traefik
- Run
kubectl get svc traefik --namespace default -w
and wait for an external IP address to appear - When an external IP address appears ensure that it matches a newly-created Load Balancer in the DigitalOcean dashboard
- Set up the following record in
/etc/hosts
:<External IP Address> example.com
- Run
kubectl apply -f whoami.yml
(see below for contents)
All of these steps complete with no errors. However, when I attempt to visit example.com
, I get a page which says 404 page not found
(plain text, no styling).
Has anyone here gotten Traefik 2 working with DigitalOcean Kubernetes? The following is the contents of whoami.yml
from step 9:
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami-deployment
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- name: whoami-container
image: containous/whoami
---
apiVersion: v1
kind: Service
metadata:
name: whoami-service
spec:
ports:
- name: http
targetPort: 80
port: 80
selector:
app: whoami
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: whoami-ingress
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: example.com
http:
paths:
- path: /
backend:
serviceName: whoami-service
servicePort: http
I've been able to get an Nginx ingress running using the guide available here, so I know I must be doing something wrong as far as Traefik is concerned: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes