Hello,
I installed traefik on my cluster kubernetes with helm on the kube-system namespace.
I try to deploy my website with a deployment, service and ingress organised this way:
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: default
labels:
app: web
spec:
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
imagePullSecrets:
- name: gitlab-log
containers:
- image: registry.gitlab.com/stikkit/website:latest
imagePullPolicy: Always
name: web
ports:
- containerPort: 8080
apiVersion: v1
kind: Service
metadata:
name: web
namespace: default
labels:
app: web
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
selector:
app: web
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: web-ingress
namespace: default
spec:
rules:
- http:
paths:
- path: /web
backend:
serviceName: web
servicePort: 80
I get a bad gateway when I order: curl 195.154.70.142/web
(195.154.70.142 is the external ip of my traefik service)
kubectl version:
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-09T11:18:22Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Helm version:
version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}