我有两个集群
NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS
cassandra-cluster europe-west4-a 1.14.10-gke.36 xx.90.xx.31 n1-standard-1 1.14.10-gke.36 3 RUNNING
codingjediweb-cluster europe-west4-a 1.14.10-gke.36 uu.90.uu.182 n1-standard-1 1.14.10-gke.36 2 RUNNING
manuchadha25@cloudshell:~ (copper-frame-262317)$
我想在cassandra群集上运行以下命令。如何将cassandra群集设置为当前上下文?
我遇到了错误。
CASS_USER=$(kubectl --cluster gke_copper-frame-262317_europe-west4-a_cassandra-cluster get secret cluster1-superuser -o json | jq -r '.data.username' | base64 --decode)kubectl
Error from server (NotFound): secrets "cluster1-superuser" not found
我尝试了这个,但是失败了。
manuchadha25@cloudshell:~ (copper-frame-262317)$ kubectl config use-context cassandra-cluster
error: no context exists with the name: "cassandra-cluster"