我无法通过网址访问我的集群。
我正在使用Ingress来这样做。我所有的Pod都运行良好,可以看到它们可以通讯,但是我无法从浏览器访问任何服务。我把它弄坏了,已经工作了一年。
这是我的Traefik配置
kind: Deployment
apiVersion: apps/v1
metadata:
name: traefik-deployment
labels:
app: traefik
spec:
replicas: 1
selector:
matchLabels:
app: traefik
template:
metadata:
labels:
app: traefik
spec:
serviceAccountName: traefik-ingress-controller
terminationGracePeriodSeconds: 60
volumes:
- name: traefik-certificate
persistentVolumeClaim:
claimName: traefik-certificate
- name: config
configMap:
name: traefik-config
containers:
- name: traefik
image: "traefik:1.7"
envFrom:
- secretRef:
name: traefik-env
volumeMounts:
- mountPath: "/etc/traefik/config"
name: config
- mountPath: "/etc/certificate"
name: traefik-certificate
args:
- --configfile=/etc/traefik/config/traefik.toml
- --api
- --kubernetes
resources:
这是我的服务定义之一
apiVersion: v1
kind: Service
metadata:
labels:
app: metadata-api
name: metadata-api
namespace: metadata
spec:
ports:
- name: "18000"
port: 18000
targetPort: 18000
selector:
app: metadata-api
type: NodePort
这是我的入口定义之一
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: metadata-ingress
namespace: metadata
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/auth-type: "basic"
traefik.ingress.kubernetes.io/auth-secret: "basic-auth"
spec:
rules:
- host: datahandler.company.com
http:
paths:
- backend:
serviceName: metadata-api
servicePort: 18000
我可以看到pod,部署和入口运行良好。我该怎么办?
答案 0 :(得分:0)
我的问题是AWS ELB已更改。我必须手动将Route53别名更改为loadbalancer。与Traefik关系不大,但也许可以帮助道路上的某个人!