document debugging
This commit is contained in:
parent
f0542ba995
commit
554fa2b530
|
|
@ -56,12 +56,24 @@ NOCLEANUP=True ./run.sh main tests.test_e2e.EndToEndTestCase.test_lazy_spilo_upg
|
||||||
|
|
||||||
## Inspecting Kind
|
## Inspecting Kind
|
||||||
|
|
||||||
If you want to inspect Kind/Kubernetes cluster, use the following script to exec into the K8s setup and then use `kubectl`
|
If you want to inspect Kind/Kubernetes cluster, switch `kubeconfig` file and context
|
||||||
|
```bash
|
||||||
|
# save the old config in case you have it
|
||||||
|
export KUBECONFIG_SAVED=$KUBECONFIG
|
||||||
|
|
||||||
|
# use the one created by e2e tests
|
||||||
|
export KUBECONFIG=/tmp/kind-config-postgres-operator-e2e-tests
|
||||||
|
|
||||||
|
# this kubeconfig defines a single context
|
||||||
|
kubectl config use-context kind-postgres-operator-e2e-tests
|
||||||
|
```
|
||||||
|
|
||||||
|
or use the following script to exec into the K8s setup and then use `kubectl`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./exec_into_env.sh
|
./exec_into_env.sh
|
||||||
|
|
||||||
# use kube ctl
|
# use kubectl
|
||||||
kubectl get pods
|
kubectl get pods
|
||||||
|
|
||||||
# watch relevant objects
|
# watch relevant objects
|
||||||
|
|
@ -71,6 +83,14 @@ kubectl get pods
|
||||||
./scripts/get_logs.sh
|
./scripts/get_logs.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to inspect the state of the `kind` cluster manually with a single command, add a `context` flag
|
||||||
|
```bash
|
||||||
|
kubectl get pods --context kind-kind
|
||||||
|
```
|
||||||
|
or set the context for a few commands at once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Cleaning up Kind
|
## Cleaning up Kind
|
||||||
|
|
||||||
To cleanup kind and start fresh
|
To cleanup kind and start fresh
|
||||||
|
|
@ -79,6 +99,12 @@ To cleanup kind and start fresh
|
||||||
e2e/run.sh cleanup
|
e2e/run.sh cleanup
|
||||||
```
|
```
|
||||||
|
|
||||||
|
That also helps in case you see the
|
||||||
|
```
|
||||||
|
ERROR: no nodes found for cluster "postgres-operator-e2e-tests"
|
||||||
|
```
|
||||||
|
that happens when the `kind` cluster was deleted manually but its configuraiton file was not.
|
||||||
|
|
||||||
## Covered use cases
|
## Covered use cases
|
||||||
|
|
||||||
The current tests are all bundled in [`test_e2e.py`](tests/test_e2e.py):
|
The current tests are all bundled in [`test_e2e.py`](tests/test_e2e.py):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue