node.js – Running kubectl commands in Azure Function
I have a kubernetes pod which I need to restart periodically. I need to have some logic to find out exact time when pod can be restarted. I think of having an Azure Function running periodically that calls external api which provides time when pod can be restarted. Problem is that I don’t know how to restart pod from within the Azure Function.
I have created Azure Function with nodejs and tried to execute kubectl command with exec method of child_process module. That resulted into Error executing kubectl command: Error: Command failed: kubectl config current-context 'kubectl' is not recognized as an internal or external command, operable program or batch file. Command I’ve used started /usr/local/bin/kubectl ...
Read more here: Source link
