I am trying to run some scale up/down tests for kubernetes pods. I have written a following bash script
#!/bin/bash
# Use kubectl to update the number of replicas for the deployment
kubectl scale deployment 'deploymentname' --replicas=4 --namespace 'appns'
The script is being called from following main.js
import exec from 'k6/x/exec';
export default function () {
// Call the shell script using the exec function
let result = exec.command('scale.sh');
}
Error
INFO[0000] 2023/05/13 00:10:59 exec: "scale.sh": executable file not found in $PATH on command: scale.sh
What am i missing?