Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

Could someone tell me what are kubectl logs?

1 Answer

0 votes
by (99k points)

There are various commands for Kubernetes that are used to interact with containers and manage them. The “kubectl logs” is one such command which is used to get or print the logs for containers in a pod.

Its syntax is:

kubectl logs [-f] [-p] POD [-c CONTAINER]

And also, if the pod has only one container, then there is no obligation to print.

If you wish to learn Kubernetes end-to-end, then have a look at Intellipaat’s Kubernetes course. Get yourself registered for this course and become a certified professional.

Also, to help you get started, I would suggest you take a look at our latest video on Kubectl Basic Commands.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Dec 21, 2020 in DevOps and Agile by chandra (29.3k points)
0 votes
1 answer
asked Dec 21, 2020 in DevOps and Agile by chandra (29.3k points)
0 votes
1 answer
asked Dec 21, 2020 in DevOps and Agile by chandra (29.3k points)

Browse Categories

...