Im running Traefik v2 as an ingress (daemonset) for my kube cluster.
I just activated access log, and generated some https traffics on my hosted website which are served by the cluster.
But i cannot see anything, no file, no logs... where it should be expected.
Name: traefik-ingress-controller-fzqq7
Namespace: default
Priority: 0
Node: sd-143012/195.154.92.20
Start Time: Sat, 16 May 2020 12:03:41 +0200
Labels: controller-revision-hash=77f4c4765
k8s-app=traefik-ingress-lb
name=traefik-ingress-lb
pod-template-generation=4
Annotations: <none>
Status: Running
IP: 195.154.92.20
IPs:
IP: 195.154.92.20
Controlled By: DaemonSet/traefik-ingress-controller
Containers:
traefik-ingress-lb:
Container ID: docker://8f5bf77582d580f6acd4eeff74bd955f3c58a3e1aadea890024a9452dc395c09
Image: traefik:v2.1.1
Image ID: docker-pullable://traefik@sha256:a87b61f3254d03c4fcc0b994e2cb7af89abba8178f1fbec3bce3f4bdc080f8a6
Port: <none>
Host Port: <none>
Args:
--providers.kubernetescrd
--entrypoints.web.address=:80
--entrypoints.websecure.address=:443
--api
--certificatesresolvers.le.acme.email=dpac@citoyx.com
--certificatesresolvers.le.acme.storage=/cert/acme.json
--certificatesResolvers.le.acme.httpChallenge.entryPoint=web
--accesslog=true
--accesslog.filepath=/logs
--metrics.prometheus=true
State: Running
Started: Sat, 16 May 2020 12:03:45 +0200
Ready: True
Restart Count: 0
Requests:
cpu: 100m
memory: 20Mi
Environment: <none>
Mounts:
/cert/ from cert (rw)
/logs/ from logs (rw)
/var/run/secrets/kubernetes.io/serviceaccount from traefik-ingress-controller-token-824zl (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
cert:
Type: HostPath (bare host directory volume)
Path: /data/kube/certs
HostPathType: Directory
logs:
Type: HostPath (bare host directory volume)
Path: /data/kube/logs
HostPathType: Directory
traefik-ingress-controller-token-824zl:
Type: Secret (a volume populated by a Secret)
SecretName: traefik-ingress-controller-token-824zl
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node-role.kubernetes.io/master:NoSchedule
node.kubernetes.io/disk-pressure:NoSchedule
node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/network-unavailable:NoSchedule
node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/pid-pressure:NoSchedule
node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unschedulable:NoSchedule
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 8m3s default-scheduler Successfully assigned default/traefik-ingress-controller-fzqq7 to sd-143012
Normal Pulling 8m2s kubelet, sd-143012 Pulling image "traefik:v2.1.1"
Normal Pulled 8m kubelet, sd-143012 Successfully pulled image "traefik:v2.1.1"
Normal Created 8m kubelet, sd-143012 Created container traefik-ingress-lb
Normal Started 7m59s kubelet, sd-143012 Started container traefik-ingress-lb
this is my deployement file :
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: traefik-ingress-controller
labels:
k8s-app: traefik-ingress-lb
kubernetes.io/cluster-service: "true"
spec:
selector:
matchLabels:
k8s-app: traefik-ingress-lb
template:
metadata:
labels:
k8s-app: traefik-ingress-lb
name: traefik-ingress-lb
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: traefik-ingress-controller
terminationGracePeriodSeconds: 60
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
- image: traefik:v2.1.1
name: traefik-ingress-lb
imagePullPolicy: Always
volumeMounts:
- mountPath: "/cert/"
name: cert
- mountPath: "/logs/"
name: logs
resources:
requests:
cpu: 100m
memory: 20Mi
args:
- --providers.kubernetescrd
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --api
- --certificatesresolvers.le.acme.email=dpac@citoyx.com
- --certificatesresolvers.le.acme.storage=/cert/acme.json
- --certificatesResolvers.le.acme.httpChallenge.entryPoint=web
- --accesslog=true
- --accesslog.filepath=/logs
- --metrics.prometheus=true
volumes:
- name: cert
hostPath:
path: /data/kube/certs
type: Directory
- name: logs
hostPath:
path: /data/kube/logs
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: traefik-web-ui
spec:
selector:
k8s-app: traefik-ingress-lb
app: traefik-ingress-lb
ports:
- port: 443
targetPort: 443
name: websecure
- port: 80
targetPort: 80
name: web
Accesslog and prometheus are active on the dashboard. So at least, the command line option is ok.
any helps ?