Kubectl get list of contexts1/16/2024 Nodes – Kubernetes runs your workload by placing containers into Pods to run on Nodes. Kubectl logs -previous – View the logs for a previously failed pod. Kubectl logs pod.log – Output the logs for a pod into a file named ‘pod.log’. Kubectl logs -c – Print the logs for a container in a pod. Kubectl logs -f – Print the logs for a pod and follow new logs. Kubectl logs -f – Get logs from a service and optionally select which container. Kubectl logs -tail=50 – Get the most recent 50 lines of logs. Kubectl logs -since=6h – Print the logs for the last 6 hours for a pod. Logs can be as coarse-grained as showing errors within a component, or as fine-grained as showing step-by-step traces of events (like HTTP access logs, pod state changes, controller actions, or scheduler decisions). ![]() You can configure log verbosity to see more or less detail. Logs – System component logs record events happening in cluster, which can be very useful for debugging. Read more about Kubernetes deployment strategies: Different Types of Kubernetes Deployment Strategies (Examples) Kubectl replace -force -f – Perform a replace deployment - Force replace, delete and then re-create the resource. Kubectl rollout undo deployment/ – Rollback a previous deployment. Kubectl set image deployment/ =image: – Perform a rolling update (K8S default), set the image of the container to a new version for a particular deployment. Kubectl rollout status deployment – See the rollout status of a deployment. Kubectl delete deployment – Delete deployments. Kubectl create deployment – Create a new deployment. Kubectl edit deployment – Edit and update the definition of one or more deployments on the server. Kubectl describe deployment – Display the detailed state of one or more deployments. Kubectl get deployment – List one or more deployments. ![]() You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments. You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. Deployments – A Deployment provides declarative updates for Pods and ReplicaSets.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |