Skip to content

Instantly share code, notes, and snippets.

@jabbas
Created November 3, 2022 20:05
Show Gist options
  • Save jabbas/cc97ee0430c5c537c9b440263d7aa9bb to your computer and use it in GitHub Desktop.
Save jabbas/cc97ee0430c5c537c9b440263d7aa9bb to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: qemu-guest-agent
namespace: kube-system
spec:
selector:
matchLabels:
name: qemu-guest-agent
template:
metadata:
labels:
name: qemu-guest-agent
spec:
volumes:
- name: virtio
hostPath:
path: /dev/virtio-ports
type: ''
containers:
- name: qemu-guest-agent
image: alpine
command: ['sh']
args:
- -c
- apk add --no-cache qemu-guest-agent && qemu-ga
securityContext:
privileged: true
volumeMounts:
- name: virtio
mountPath: /dev/virtio-ports
@si458
Copy link

si458 commented Jun 5, 2023

brilliant script!
sadly it doesnt detect the IP addresses correctly,
its showing mine as a 10.244 range which is actually the pod range and not the ip of the host itself !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment