report errors
Previously, I used kubectl logs -f <POD-name> -n <nameSpace> to view the logs of a pod. One day when I used this command to check the status of a pod that was runnning, I got an error.
Error from server (BadRequest): a container name must be specified for pod xxx ,choose one of:[xxx xxx]
Causes and treatment of error reporting
Reason: originally, a pod used a container. When you use the command to view the pod log, the log of the pod’s container will be output…
but one day, the architect adjusted the structure of the pod and enabled multiple containers in a pod. From then on, you need to specify which container to view the pod when viewing the log. You can use the command – C < container_ name> Specify that the name of the container that can be viewed is listed in the choose one of error message
kubectl logs -f <POD-name> -n <nameSpace> -c <container_name>
Read More:
- [Solved] pod Error: back off restarting failed container
- Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container…
- [Solved] CCS compilation and debug error: Source lookup: unable to restore CPU specific source container – expecting valid source container id value.
- The spring project is normal locally, and the bean cannot be found error is thrown when entering the docker container
- [Solved] kubectl top pod error: error: Metrics API not available
- [kubernetes] the pod instance of calico node always reports an error and restarts
- Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl
- Pod install Error: LoadError [How to Solve]
- [Solved] kubelet Startup Error: cannot find network namespace for the terminated container
- [Solved] eggjs Error: Warning: Current Server Discovery and Monitoring engine is deprecated, and will be rem…
- MAC: How to modify the docker container error [screen is terminating]
- [Solved] pod CDN: trunk Repo update failed – 56 error(s):
- M1 Computer: How to Solve pod update
- How to Solve Macbookm1 pod error
- [Solved] ArcGIS Error: Failed to create the site. One or more server machines could not be stopped
- IIS 404 The page cannot be displayed because an internal server error has occurred
- M1 MacBook pod install Report an error chip incompatibility problem
- Docker: How to Enter the Closed Container and View the Logging
- How to Solve pod Error: “Authentication token is invalid or unverified. Either verify it with the email that…”
- K8s ❉ Error: cannot be handled as a** [How to Solve]