Skip to content

Commit 5cfc5d3

Browse files
committed
Deprecated components mode
1 parent 8882ebf commit 5cfc5d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

check_kubernetes.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ usage() {
3737
3838
Modes are:
3939
apiserver Not for kubectl, should be used for each apiserver independently
40-
components Check for health of k8s components (etcd, controller-manager, scheduler etc.)
4140
nodes Check for active nodes
4241
daemonsets Check for daemonsets readiness
4342
deployments Check for deployments availability
@@ -47,6 +46,7 @@ usage() {
4746
statefulsets Check for statefulsets readiness
4847
tls Check for tls secrets expiration dates
4948
unboundpvs Check for unbound persistent volumes.
49+
components Check for health of k8s components (deprecated in K8s 1.19+)
5050
EOF
5151

5252
exit 2
@@ -151,6 +151,7 @@ mode_apiserver() {
151151
OUTPUT="OK. Kubernetes apiserver health is OK"
152152
EXITCODE=0
153153
else
154+
data=$(echo "$data" | grep "\[\-\]")
154155
OUTPUT="CRITICAL. Kubernetes apiserver health is $data"
155156
EXITCODE=2
156157
fi

0 commit comments

Comments
 (0)