Forum
No internet connection
  1. Home
  2. Training and Certification

Error from server (Internal Error): Fail to check auth[Training & Certification]

By 丁全 洪 @robin_hon
    2021-03-09 03:36:03.331Z

    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

    Solved in post #5, click to view
    • 4 replies
    1. S
      @sk_chen
        2021-03-09 04:58:39.111Z

        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}

        1. R
          In reply torobin_hon:
          丁全 洪 @robin_hon
            2021-03-09 06:17:31.037Z

            I already switched to SA context :
            $ kubectl config use-context 7e159ebf-7a2f-11eb-b807-d640d3388395-eks004-context

            or switched to HZ context:
            $ kubectl config use-context 8a163457-7a52-11eb-b532-ea1833789b2d-eks006-context

            the problem still there.

            1. S
              In reply torobin_hon:
              @sk_chen
                2021-03-09 06:24:05.269Z

                confirm which namespace u use
                kubectl get namespace

                1. R
                  In reply torobin_hon:
                  丁全 洪 @robin_hon
                    2021-03-09 06:59:13.500Z

                    The namespace should be set to "assignment", so it's working now, thanks.

                    ReplySolution