knotc [parameters] action [action_args]
If an optional zone argument is not specified, the command is applied to all zones.
Generate key:
$ dnssec-keygen -a hmac-md5 -b 256 -n HOST knotc-key
Extract secret in base64 format and create keyfile:
$ echo "knotc-key hmac-md5 <secret>" > knotc.key
Make sure the key can be read/written only by the owner for security reasons.
$ knotc -s 127.0.0.1 -k knotc.key reload
$ knotc -c knot.conf flush
knotd(8), knot.conf(5).