apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx
spec:
selector:
matchLabels:
run: my-nginx
replicas: 2
template:
metadata:
labels:
run: my-nginx
spec:
containers:
- name: my-nginx
image: nginx
ports:
- containerPort: 8090
name: nginx-fake-port
df -h --output="source,pcent" | grep \/dev | tr -d "/dev/" | tr -d "%" | awk '{print "{\"disk_"$1"\"",":"$2"}"}' | tr -d " "| sed -z 's/\n/,/g' | sed -z 's/^/{/;s/.$/}/g'
{{"disk_nm0n1p2":52},{"disk_nm4n1":1},{"disk_nm3n1":91},{"disk_nm1n1":4},{"disk_nm2n1":81}}