Last active
April 1, 2020 07:34
-
-
Save clux/5b0fe2c7de2c19907e34f1ff30391812 to your computer and use it in GitHub Desktop.
k-update-cm-filebeat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF | yq . -y | kubectl apply -n kube-system -f - | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: { name: filebeat-config } | |
data: | |
filebeat.yml: |- | |
$(kubectl get cm -n kube-system filebeat-config -oyaml \ | |
| yq '.data["filebeat.yml"]' -r \ | |
| sed -n "/output/q;p" \ | |
| sed -e "\$aoutput.console:\n pretty: false" | |
| sed 's/^/ /') | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment