Which kubectl commands apply a manifest, list Pods and read a Pod's logs?
Options
kubectl apply -f x.yaml,get pods,logs <pod>(Correct option)kubectl run x.yaml,kubectl list,kubectl showkubectl build,kubectl push,kubectl readkubectl start,kubectl stop,kubectl delete
Answer
kubectl apply -f x.yaml, kubectl get pods, kubectl logs <pod>
Why
kubectl is the command line for Kubernetes.
kubectl apply -f deployment.yaml: create or update objects from a file (declarative).kubectl get pods(alsodeploy,svc,-Afor all namespaces).kubectl describe pod <name>: details and events (why it is not starting).kubectl logs <pod>(-ffollow,--previousfor the last crashed container).kubectl exec -it <pod> -- sh: shell inside.kubectl rollout undo deployment/<name>: roll back.
Remember
apply, get, describe, logs.