like this: sudo kubectl --kubeconfig /etc/rancher...
# general
d
like this: sudo kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml --namespace mgmtcompanion get configmap dfc-e6752ccc-2f8b-4599-a230-023fb6a76677-default-mqtt-simulator -o yaml > benthos.yaml and just replace the resource name with your resource name