MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

EKS cluster setup error: the server doesn’t have a resource type “services

[root@ip-172-31-26-102 ~]# kubectl cluster-info
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
error: the server doesn't have a resource type "services"
[root@ip-172-31-26-102 ~]# kubectl get svc
error: the server doesn't have a resource type "svc"
[root@ip-172-31-26-102 ~]# kubectl get deploy
error: the server doesn't have a resource type "deploy"
[root@ip-172-31-26-102 ~]# kubectl get nodes
error: the server doesn't have a resource type "nodes"Code language: PHP (php)
  • When an Amazon EKS cluster is created, the IAM entity (user or role) that creates the cluster is added to the Kubernetes RBAC authorization table as the administrator (with system:master permissions.
  • Initially, only that IAM user can make calls to the Kubernetes API server using kubectl.
  • If you use the console to create the cluster, you must ensure that the same IAM user credentials are in the AWS SDK credential chain when you are running kubectl commands on your cluster.
  • When you create an Amazon EKS cluster, the IAM entity user or role, such as a federated user that creates the cluster, is automatically granted system:masters permissions in the cluster’s RBAC configuration.

To grant additional AWS users or roles the ability to interact with your cluster, you must edit the aws-auth ConfigMap within Kubernetes.

$ kubectl describe configmap -n kube-system aws-auth
$ kubectl edit -n kube-system configmap/aws-auth
  • To add an IAM user: add the user details to the mapUsers section of the ConfigMap, under data. Add this section if it does not already exist in the file. Each entry supports the following parameters:
    • userarn: The ARN of the IAM user to add.
    • username: The user name within Kubernetes to map to the IAM user. By default, the user name is the ARN of the IAM user.
    • groups: A list of groups within Kubernetes to which the user is mapped to. For more information, see Default Roles and Role Bindings in the Kubernetes documentation.
  • To add an IAM role (for example, for federated users): add the role details to themapRoles section of the ConfigMap, under data. Add this section if it does not already exist in the file. Each entry supports the following parameters:
    • rolearn: The ARN of the IAM role to add.
    • username: The user name within Kubernetes to map to the IAM role. By default, the user name is the ARN of the IAM role.
    • groups: A list of groups within Kubernetes to which the role is mapped. For more information, see Default Roles and Role Bindings in the Kubernetes documentation.
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
  mapRoles: |
    - rolearn: arn:aws:iam::555555555555:role/devel-worker-nodes-NodeInstanceRole-74RF4UBDUKL6
      username: system:node:{{EC2PrivateDNSName}}
      groups:
        - system:bootstrappers
        - system:nodes
  mapUsers: |
    - userarn: arn:aws:iam::555555555555:user/admin
      username: admin
      groups:
        - system:masters
    - userarn: arn:aws:iam::111122223333:user/ops-user
      username: ops-user
      groups:
        - system:mastersCode language: PHP (php)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

AWS Tutorials: How to manually grant your Federated IAM User access to kubectl in AWS EKS?

Thanks for pointing that out! The AWS EKS authentication method has changed in 2026, and the aws-auth ConfigMap is no longer used for adding IAM roles. Instead,…

Read More

EKS error: You must be logged in to the server (Unauthorized)

You should not create the cluster with root account. Instead create a user or if you want to install EKS with aws cli create IAM role for…

Read More

How to setup Kubernetes AWS Gateway API Controller on Amazon EKS?

The AWS Gateway API Controller lets you use Kubernetes Gateway API resources (Gateway, HTTPRoute, GRPCRoute) on Amazon EKS. Instead of creating a load balancer, the controller turns…

Read More

Kubernetes: How to Run a Pod and Get the EGRESS IP Address KubernetesEKS

1. Deploy a Pod to Your Cluster You can launch a simple Pod using the kubectl run command. For example, to run an NGINX Pod: bashkubectl run…

Read More

Kubernetes: Deploying AWS Load Balancer Controller with Terraform

Absolutely, deploying the AWS Load Balancer Controller (ALB Controller) in production via Terraform is now a very common, robust, and recommended practice. There are official Terraform modules…

Read More

What is OIDC identity provider?

Great question! Here’s a clear, non-technical explanation and then a technical one for OIDC identity provider, especially in the context of Kubernetes and AWS. In Simple Words:…

Read More