While trying to update to new release via dashboard Even though the previous version was updated successfully Dashboard shows error and stalls subsequent update. When tried to stop and start app replicatedctl throws array index out of bounds error.
Error Trace:
error: error executing jsonpath "{.items[0].metadata.name}": Error executing template: array index out of bounds: index 0, length 0. Printing more information for debugging the template:
template was:
{.items[0].metadata.name}
object given to jsonpath engine was:
map[string]interface {}{"apiVersion":"v1", "items":[]interface {}{}, "kind":"List", "metadata":map[string]interface {}{"resourceVersion":"", "selfLink":""}}
error: expected 'exec (POD | TYPE/NAME) COMMAND [ARG1] [ARG2] ... [ARGN]'.
POD or TYPE/NAME and COMMAND are required arguments for the exec command
See 'kubectl exec -h' for help and examples
Mani, there should a a label on the replicated pod tier: master. You can see the failing command that looks for it in the /usr/local/bin/replicatedctl scrip. Can you check what labels the pod has:
kubectl get pod replicated-<generated stuff> -o yaml | grep -w -5 labels
I think I found the reason for this issue.
This arises when I change my default namespace in context. This eventually means /usr/local/bin/replicatedctl should use -n default in the kubectl commands. Screenshot attached.
Should I raise an issue in any GitHub repo?