I'm new to Kubernetes and was following some examples for setting contexts. Now I can't seem to get any objects on my server, or I'm talking to the wrong server. I see...
$ kubectl config view
apiVersion: v1
clusters:
- cluster:
server: ""
name: sandbox
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://redacted.gr7.us-east-1.eks.amazonaws.com
name: sandbox.us-east-1.eksctl.io
contexts:
- context:
cluster: sandbox.us-east-1.eksctl.io
user: [email protected]@sandbox.us-east-1.eksctl.io
name: [email protected]@sandbox.us-east-1.eksctl.io
- context:
cluster: sandbox
namespace: kube-system
user: ""
name: sandbox
current-context: sandbox
kind: Config
preferences: {}
users:
- name: [email protected]@sandbox.us-east-1.eksctl.io
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- token
- -i
- sandbox
command: aws-iam-authenticator
env:
- name: AWS_STS_REGIONAL_ENDPOINTS
value: regional
- name: AWS_DEFAULT_REGION
value: us-east-1
I see the cluster in AWS EKS, and see pods, deployments, etc. But when I do the following
$ kubectl get pods -A
error: the server doesn't have a resource type "pods"
$ kubectl get nodes -A
error: the server doesn't have a resource type "nodes"
What gives?
question from:
https://stackoverflow.com/questions/66055337/how-to-set-eks-server-for-kubectl-to-talk-to 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…