kubernetes combine logs all replicas 1

kubernetes combine logs all replicas

kubectl logs -l app=myapp

Here is what the above code is Doing:
1. Create a new deployment named myapp-deployment with 3 replicas of the image nginx:1.7.9.
2. Create a new service named myapp-service of type NodePort that targets TCP port 80 on any Pod with the app=myapp label.
3. Wait until the myapp-deployment is ready by checking the minimum available replicas.
4. Print a message to the console with the external IP address and port of the myapp-service.
5. Print the logs from the myapp-deployment.

Similar Posts