aws eks update-kubeconfig --name fieldin-qa --region eu-west-1
aws eks update-kubeconfig --name fieldin-dev --region eu-west-1
kubectl apply -f <file.yaml>
kubectl get <objecttype>
e.g. kubectl get pods
e.g. kubectl get deployments
kubectl get <objecttype> -o wide
e.g. kubectl get pods -o wide
##### Describe resource
kubectl describe <object type> [objectname]
e.g. kubectl describe pod client-pod
kubectl delete -f <configfile.yaml>
kubectl delete <objecttype> <objectname>
e.g. kubectl delete deployment client-deployment
kubectl delete pod <pod_name_id>
kubectl logs <podname>
kuebctl exec -it <podname> sh
kubectl config get-contexts
kubectl config set current-context <context_name>
kubectl config set-context --current --namespace=<insert-namespace-name-here>
kubectl expose deployment trackings-preprocess --type=NodePort --port=9090
kubectl get service <service_name>
kubectl cp <local_file> <pod_name>:<path_in_pod>
e.g. kubectl cp buffer.sql db-buffer-6544788fb-bn24m:/var/tmp
kubectl rollout restart deployment/<deployment>
kubectl port-forward <pod> <external_port>:<internal_port>
kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}"
kubectl logs podname -c containername --previous
e.g. kubectl logs is-spraying-67cd646694-p9r5t -c is-spraying --previous
kubectl scale deployment <DEPLOYMENT NAME> --replicas=<#PODS>
kubectl -n kube-system get deployment
kubectl -n kube-system get svc
kubectl -n kube-system rollout restart deployment/coredns