Skip to main content

How to test if your code runs inside the container correctly?

Check your deployment on Production / Staging

1) Make your kubectl work with powr k8s cluster reading this

2) Check logs on our workload, if there is no errors we can say that code runs correctly. Command to check is:

kubectl logs [PODNAME] -n [NAMESPACE]

You can list namespaces by running:

kubectl get namespace

and get pods by:

kubectl get pods -n kubeprod

or run that against all:

kubectl get all -A

To see all units run in your namespace:

kubectl get all -n kubeprod

Build and run docker image locally to check your code inside container

  1. Start docker
  2. In the project root run:
docker build -f Dockerfile.web .

, the build should end successfully.

  1. Run whole powr project locally:
powr dev:up
  1. Check if there are no any errors.

search tags

  • k8s logs, kubernetes logs, kubernetes log production, kubernetes log staging