We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5321758 commit 4069b6cCopy full SHA for 4069b6c
check_kubernetes.sh
@@ -156,7 +156,9 @@ mode_apicert() {
156
die "Apiserver URL should be defined in this mode"
157
fi
158
APICERT=$(echo "$APISERVER" | awk -F "//" '{ print $2 }' | awk -F ":" '{ print $1 }')
159
- APICERTDATE=$(echo | openssl s_client -connect "$APICERT":6443 2>/dev/null | openssl x509 -noout -dates | grep notAfter | sed -e 's#notAfter=##')
+ APIPORT=$(echo "$APISERVER" | awk -F "//" '{ print $2 }' | awk -F ":" '{ print $2 }')
160
+ set ${APIPORT:=443}
161
+ APICERTDATE=$(echo | openssl s_client -connect "$APICERT":"$APIPORT" 2>/dev/null | openssl x509 -noout -dates | grep notAfter | sed -e 's#notAfter=##')
162
a=$(date -d "$APICERTDATE" +%s)
163
b=$(date +%s)
164
c=$((a-b))
0 commit comments