I have 3 different apps (my-app-1, my-app-2, my-app-3)
I am trying to add doskey shortcuts for the logs
i.e. for the below command
kubectl logs my-app-1-<SOME_RANDOM_POD_ID>
My intention is to NOT enter anything on the prompt, but somehow use the shortcuts directly to run the "kubectl logs <APP_1/2/3>"
command
doskey klogsapp1=kubectl get pods $B grep $1.*Running $B cut -d " " -f1 $B xargs kubectl logs -c my-app-1
doskey klogsapp2=kubectl get pods $B grep $1.*Running $B cut -d " " -f1 $B xargs kubectl logs -c my-app-2
doskey klogsapp3=kubectl get pods $B grep $1.*Running $B cut -d " " -f1 $B xargs kubectl logs -c my-app-3
For some reason, the above commands are not working. is there any way by which I can have a shortcut for the same ?