<p>Admins-MacBook-Pro:~ Harshin$  kubectl cluster-info
Kubernetes master is running at <a href="http://localhost:8080" rel="noreferrer">http://localhost:8080</a></p>

<p>To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
error: the server doesn't have a resource type "services"</p>

<p>i am following this document </p>

<p><a href="https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html?refid=gs_card" rel="noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html?refid=gs_card</a></p>

<p>while i am trying to test my configuration in step 11 of configure kubectl for amazon eks </p>

<pre><code>apiVersion: v1
clusters:
- cluster:
    server: ...
    certificate-authority-data: ....
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: aws
  name: aws
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: heptio-authenticator-aws
      args:
        - "token"
        - "-i"
        - "kunjeti"
        # - "-r"
        # - "&lt;role-arn&gt;"
      # env:
        # - name: AWS_PROFILE
        #   value: "&lt;aws-profile&gt;"
</code></pre>

<p>Change "name: kubernetes" to actual name of your cluster. </p>

<p>Here is what I did to work it through....</p>

<p>1.Enabled verbose to make sure config files are read properly. </p>

<blockquote>
  <p>kubectl get svc --v=10</p>
</blockquote>

<p>2.Modified the file as below:</p>

<pre><code>apiVersion: v1
clusters:
- cluster:
    server: XXXXX
    certificate-authority-data: XXXXX
  name: abc-eks
contexts:
- context:
    cluster: abc-eks
    user: aws
  name: aws
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: aws-iam-authenticator
      args:
        - "token"
        - "-i"
        - "abc-eks"
        # - "-r"
        # - "&lt;role-arn&gt;"
      env:
        - name: AWS_PROFILE
          value: "aws"
</code></pre>
