When I acsess the same domain in the same kuberetes, the traefik v2.10.1
pod dns are different with others, this is the traefik dns look like:
/ $ nslookup kubernetes.default
Server: 100.100.2.136
Address: 100.100.2.136:53
** server can't find kubernetes.default: NXDOMAIN
** server can't find kubernetes.default: NXDOMAIN
and this is the other pod dns look like:
root@y-websocket-service-9654986bc-cf65m:/home/node/app# nslookup kubernetes.default
Server: 10.96.0.10
Address: 10.96.0.10#53
Name: kubernetes.default.svc.cluster.local
Address: 10.96.0.1
this is the traefik define in kubernetes look like:
apiVersion: apps/v1
kind: Deployment
metadata:
name: traefik
namespace: default
status:
observedGeneration: 6
replicas: 1
updatedReplicas: 1
readyReplicas: 1
availableReplicas: 1
conditions:
- type: Available
status: 'True'
lastUpdateTime: '2024-07-06T08:40:50Z'
lastTransitionTime: '2024-07-06T08:40:50Z'
reason: MinimumReplicasAvailable
message: Deployment has minimum availability.
- type: Progressing
status: 'True'
lastUpdateTime: '2024-07-09T14:04:24Z'
lastTransitionTime: '2024-07-08T12:57:09Z'
reason: NewReplicaSetAvailable
message: ReplicaSet "traefik-5f6fd6d8f5" has successfully progressed.
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: traefik
app.kubernetes.io/name: traefik
template:
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/instance: traefik
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: traefik
helm.sh/chart: traefik-10.1.1
annotations:
kubectl.kubernetes.io/restartedAt: '2024-07-09T14:04:02Z'
spec:
volumes:
- name: data
emptyDir: {}
- name: tmp
emptyDir: {}
- name: config-volume
configMap:
name: traefik-config
defaultMode: 420
containers:
- name: traefik
image: registry.cn-qingdao.aliyuncs.com/reddwarf-public/traefik:v2.10.1
args:
- '--global.checknewversion'
- '--global.sendanonymoususage'
- '--entryPoints.metrics.address=:9300/tcp'
- '--entryPoints.traefik.address=:9000/tcp'
- '--entryPoints.web.address=:8000/tcp'
- '--entryPoints.websecure.address=:8443/tcp'
- '--api.dashboard=true'
- '--ping=true'
- '--accesslog=true'
- '--tracing=true'
- '--log.level=DEBUG'
- ‘--log.filePath=/opt/traefik.log’
- '--metrics.prometheus=true'
- '--metrics.prometheus.entrypoint=metrics'
- '--providers.kubernetescrd'
- '--providers.kubernetesingress'
ports:
- name: metrics
hostPort: 9300
containerPort: 9300
protocol: TCP
- name: traefik
hostPort: 9000
containerPort: 9000
protocol: TCP
- name: web
hostPort: 8000
containerPort: 8000
protocol: TCP
- name: websecure
hostPort: 8443
containerPort: 8443
protocol: TCP
resources: {}
volumeMounts:
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
- name: config-volume
mountPath: /etc/traefik
livenessProbe:
httpGet:
path: /ping
port: 9000
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 2
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /ping
port: 9000
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 2
periodSeconds: 10
successThreshold: 1
failureThreshold: 1
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
drop:
- ALL
runAsUser: 65532
runAsGroup: 65532
runAsNonRoot: true
readOnlyRootFilesystem: true
restartPolicy: Always
terminationGracePeriodSeconds: 60
dnsPolicy: ClusterFirst
serviceAccountName: traefik
serviceAccount: traefik
hostNetwork: true
securityContext:
fsGroup: 65532
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
Am I missing something?