Add klogs.sh script

This commit is contained in:
Matheus Albino Brunhara
2023-09-26 08:36:08 -03:00
parent 652debfb47
commit e3c7966b33

13
my-scripts/shell/klogs.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Check if an argument was provided
if [ $# -eq 0 ]; then
echo "Usage: ./script.sh <deployment-name>"
exit 1
fi
# Get the deployment name from the first argument
deployment_name=$1
# Run the kubectl command
kubectl logs -l app.kubernetes.io/instance="$deployment_name"