The kubectl logs command is used to retrieve logs from containers in Kubernetes Pods. To view the logs of a previously terminated container, you use the -p (previous) flag. To specify the container within the Pod, you use the -c (container) flag.
The correct syntax should be the following:
kubectl logs web-1 -c ruby
Check https://kubernetes.io/docs/reference/kubectl/quick-reference/#interacting-with-running-pods
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
shahy0
1 week, 1 day ago2211094
1 month, 3 weeks agopulsefire
6 months agodimoz
8 months agoncsiki
8 months, 1 week agoPinkAndBlack
8 months, 2 weeks ago