In this blog you will find some useful Kubectl commands for Sitecore.
## Restart SOLR PODS
kubectl rollout restart statefulsets solr
## Connecting to a container:
kubectl exec -i -t -n sitecore cm-576444b4fb-bbkfs -c cm "--" powershell
##Check container logs from beginning:
kubectl logs {pod-id} -n sitecore | more
##Copy files from your container to you machine. Looks at the Root of the container. This command needs to run in kubernetes and not your pod.
kubectl cp FULLContainerName:1.dmp 1.dmp --namespace sitecore
e.g: kubectl cp cd-green-5c85db877d-5g867:1.dmp 1.dmp --namespace sitecore
##Get logs from Ingress
kubectl -n ingress logs -f replicasets/nginx-ingress-ingress-nginx-controller-5cdddf9485 --all-containers=true --since=10m
kubectl -n ingress logs -f replicasets/nginx-ingress-ingress-nginx-controller-74bf967844 --all-containers=true --since=10m
kubectl -n ingress logs -f replicasets/nginx-ingress-ingress-nginx-controller-5cdddf9485 -c cd-blue-7754958966-67k6t --since=1m