Adding more debuging
@@ -61,6 +61,7 @@ do
done
# Print some final output to make debuging easier.
+echo "kuberhealthy logs"
kubectl logs -n $NS --selector $selector
echo "get khs \n"
@@ -69,8 +70,21 @@ kubectl get -n $NS khs -o yaml
echo "get all \n"
kubectl get -n $NS all
+# Checking for Completed and Error nodes
+kubectl -n $NS get pods |grep deployment |grep -q Completed
+if [ $? == 0 ]
+then
echo "completed deployment logs"
kubectl -n $NS logs $(kubectl get pod -n $NS -l kuberhealthy-check-name=deployment |grep Completed |tail -1 |awk '{print $1}')
+else
+ echo "No Completed deployment pods found"
+fi
+kubectl -n $NS get pods |grep deployment |grep -q Error
+if [ $? == 0 ]
+then
echo "Error deployment logs"
kubectl -n $NS logs $(kubectl get pod -n $NS -l kuberhealthy-check-name=deployment |grep Error |tail -1 |awk '{print $1}')
+else
+ echo "No Error deployment pods found"
+fi
