kubectl vs aws eks - which one to use when?

4/17/2020

We host Docker containers on AWS infrastructure using AWS EKS. My reading so far shows that the kubectl command-line tool gives me commands to query and manipulate the EKS cluster. The aws eks command-line tool also gives me commands to do this. To my inexperienced eye, they look like they offer the same facilities.

Are there certain situations when it's better to use one or the other?

-- Ed Graham
amazon-eks
amazon-web-services
aws-eks
kubectl
kubernetes

1 Answer

4/17/2020

aws eks command is for interacting with AWS EKS proprietary APIs to perform administrative tasks such as creating cluster, updating kubeconfig with correct credentials etc. Kubectl is an open source ClI tool which let you interact with kubernetes API server to perform tasks such create pods, deployments etc. You can not use aws eks command to interact with Kubernetes API Server and perform any kubernetes specific operations because it does not understand kubernetes APIs. Similarly you can not use kubectl to interact with AWS EKS proprietary APIs because kubectl does not understand it.

-- Arghya Sadhu
Source: StackOverflow