fixed path for kubectl in check script
This commit is contained in:
parent
184f680fd6
commit
ff0034ac4b
1 changed files with 2 additions and 2 deletions
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This file is managed by puppet.
|
# This file is managed by puppet.
|
||||||
|
|
||||||
num_replica=$(kubectl get pods -n sunet-cnpg -o json \
|
num_replica=$(/snap/bin/kubectl get pods -n sunet-cnpg -o json \
|
||||||
| jq -r '
|
| jq -r '
|
||||||
.items[]
|
.items[]
|
||||||
| select(.metadata.labels.role=="replica")
|
| select(.metadata.labels.role=="replica")
|
||||||
| "\(.metadata.name)\t\(.metadata.labels.role)\t\(.status.phase)"
|
| "\(.metadata.name)\t\(.metadata.labels.role)\t\(.status.phase)"
|
||||||
' | wc -l)
|
' | wc -l)
|
||||||
|
|
||||||
num_primary=$(kubectl get pods -n sunet-cnpg -o json \
|
num_primary=$(/snap/bin/kubectl get pods -n sunet-cnpg -o json \
|
||||||
| jq -r '
|
| jq -r '
|
||||||
.items[]
|
.items[]
|
||||||
| select(.metadata.labels.role=="primary")
|
| select(.metadata.labels.role=="primary")
|
||||||
|
|
Loading…
Add table
Reference in a new issue