This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create Cluster from AWS Command Line | |
aws eks --region us-east-1 create-cluster --name development --kubernetes-version 1.14 --role-arn arn:aws:iam::356286290706:role/testuserrole --resources-vpc-config subnetIds=subnet-eef720c1,subnet-7d402619,securityGroupIds=sg-70aa0c05 | |
Update Cluster from AWS Command Line | |
aws eks update-kubeconfig --name development --region us-east-1 | |
Returns descriptive information about an Amazon EKS cluster. | |
$aws eks describe-cluster --name devel | |
Update the Kube Config in the file system | |
$export KUBECONFIG=~/.kube/awsdevconfig | |
Describe the AWS Kube Cluster | |
$aws eks describe-cluster --name cluster-name | |
This is to update the Kube configuaration, this needs to be run for switching the Kube config | |
Troubleshooting Kubectl errors : | |
To see the configuration of your AWS CLI user or role, run the following command: | |
aws sts get-caller-identity | |
Update AWS EKS Kubeconfig | |
aws eks update-kubeconfig --name eks-cluster-name --region aws-region | |
$aws eks --region region-name update-kubeconfig --name cluster-name | |
Update the config file path on the Path | |
$export KUBECONFIG=~/.kube/awsdevconfig | |
Get Kube Cluster information | |
$kubectl cluster-info | |
Get the Kube Pod information | |
$kubectl -n kcs-usdev get pods | |
Get the Kube Pod information details | |
$kubectl -n kube-system get pods | |
Open the file it would have gotten all the information from the remote cluster | |
$vi /Users/k.kanaparthi/.kube/awsdevconfig | |
Get all the deployments information on the cluster | |
$kubectl get deployments --all-namespaces | |
Get all services information deployed on the cluster | |
kubectl get svc --all-namespaces | |
Delete any services that have an associated EXTERNAL-IP value. | |
These services are fronted by an Elastic Load Balancing load balancer, and you must delete them in Kubernetes to allow the load balancer and associated resources to be properly released. | |
kubectl delete svc service-name | |
To view the raw metrics output, use kubectl with the --raw flag. | |
This command allows you to pass any HTTP path and returns the raw response. | |
kubectl get --raw /metrics | |
Delete all pods under a namespace. | |
kubectl delete --all pods --namespace=prometheus | |
Get all pods in the name space. | |
kubectl get pods | |
Describe a pod | |
kubectl describe pod/podname -n default | |
Tail the logs of a pod | |
kubectl logs --follow podname containername |
Comments
Post a Comment