Chef: How to regenerate the validation key

Today I’ve lost the Chef validation key of one the servers that we have around. I haven’t found how to recover it in a quick Google search, so… good reason to write this short post.

The validation “thing”, is a client (not an user) in Chef which has permission to register new Chef clients to the server. To regenerate you have to remove the client and create it again:

knife client delete myorg-validator -D
knife client create socialoptimizr-validator --validator > /etc/chef-server/validator.pem


Next Article

Spot instances: savings and adrenaline