Skip to content

Instantly share code, notes, and snippets.

@pmint93
Created December 31, 2022 17:01
Show Gist options
  • Select an option

  • Save pmint93/90e5ccbb4b52ca201f0ae48a26e00895 to your computer and use it in GitHub Desktop.

Select an option

Save pmint93/90e5ccbb4b52ca201f0ae48a26e00895 to your computer and use it in GitHub Desktop.
Tail systemd-networkd journal log from K8s Daemonset
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
labels:
app: journal-reader
name: journal-reader
namespace: kube-system
spec:
selector:
matchLabels:
app: journal-reader
template:
metadata:
labels:
app: journal-reader
spec:
containers:
- name: default
image: ubuntu:20.04
command:
- /bin/bash
args:
- -c
- "apt update && apt install -y systemd && journalctl --no-tail -fu systemd-networkd"
volumeMounts:
- name: host-etc
subPath: machine-id
mountPath: /etc/machine-id
- name: host-journal
mountPath: /var/log/journal
volumes:
- name: host-etc
hostPath:
path: /etc
- name: host-journal
hostPath:
path: /var/log/journal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment