I already active training space in SA datacenter, and type command:
$ kubectl get pod
then response : Error from server (Internal Error): Fail to check auth
I don't know what happened.
some information are following:
$ kubectl config view
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://api-proxy-eks004.sa.wise-paas.com
name: eks004 - cluster:
insecure-skip-tls-verify: true
server: https://api-proxy-eks006.hz.wise-paas.com.cn
name: eks006 - cluster:
certificate-authority: /home/centos/.minikube/ca.crt
server: https://192.168.49.2:8443
name: minikube
contexts: - context:
cluster: eks004
namespace: sa-tran
user: 7e159ebf-7a2f-11eb-b807-d640d3388395
name: 7e159ebf-7a2f-11eb-b807-d640d3388395-eks004-context - context:
cluster: eks006
namespace: hz-tran
user: 8a163457-7a52-11eb-b532-ea1833789b2d
name: 8a163457-7a52-11eb-b532-ea1833789b2d-eks006-context - context:
cluster: minikube
namespace: default
user: minikube
name: minikube
current-context: 7e159ebf-7a2f-11eb-b807-d640d3388395-eks004-context
kind: Config
preferences: {}
users: - name: 7e159ebf-7a2f-11eb-b807-d640d3388395
user:
token: REDACTED - name: 8a163457-7a52-11eb-b532-ea1833789b2d
user:
token: REDACTED - name: minikube
user:
client-certificate: /home/centos/.minikube/profiles/minikube/client.crt
client-key: /home/centos/.minikube/profiles/minikube/client.key
$ kubectl config get-contexts
-
7e159ebf-7a2f-11eb-b807-d640d3388395-eks004-context eks004 7e159ebf-7a2f-11eb-b807-d640d3388395 sa-tran 8a163457-7a52-11eb-b532-ea1833789b2d-eks006-context eks006 8a163457-7a52-11eb-b532-ea1833789b2d hz-tran minikube minikube minikube default
$ kubectl get pod
Error from server (Internal Error): Fail to check auth
- S@sk_chen
HI Robin
u need to know your own namespace auth
Display the merged config configuration
kubectl config view
Show all context lists
kubectl config get-contexts
Display the current Cluster name
kubectl config current-context
Switch to any Cluster
kubectl config use-context {context_name}
Show all namespace lists
kubectl get namespace
Switch to any Namespace
kubectl config set-context --current --namespace = {namespace_name}
- RIn reply torobin_hon⬆:丁全 洪 @robin_hon
I already switched to SA context :
$ kubectl config use-context 7e159ebf-7a2f-11eb-b807-d640d3388395-eks004-contextor switched to HZ context:
$ kubectl config use-context 8a163457-7a52-11eb-b532-ea1833789b2d-eks006-contextthe problem still there.
- SIn reply torobin_hon⬆:@sk_chen
confirm which namespace u use
kubectl get namespace - RIn reply torobin_hon⬆:丁全 洪 @robin_hon
The namespace should be set to "assignment", so it's working now, thanks.