This message was deleted.
# harvester
a
This message was deleted.
b
I have also tried using "lab" which is the cluster name in rancher, but that sa also has 0 secrets. the script does print an error when I run it, after it configures the rolebinding:
Copy code
: integer expression expected 57: [: 25
The part that fails is this, I think:
Copy code
read -r SERVER_MAJOR_VERSION SERVER_MINOR_VERSION < <(kubectl version -ojson | jq -r '[.serverVersion | .major, .minor] | join(" ")')
  if [ "${SERVER_MAJOR_VERSION}" -ge 1 ] && [ "${SERVER_MINOR_VERSION}" -ge 24 ]; then
running the
kubectl version -ojson | ...
command, it outputs:
1 25
got it. kubectl output parsing added some hidden characters, probably newline. changing the if like this fixed it:
Copy code
if [ ${SERVER_MAJOR_VERSION//[$'\t\r\n ']} -ge 1 ] && [ ${SERVER_MINOR_VERSION//[$'\t\r\n ']} -ge 24 ]; then