Controlplane keeps hanging Travis CI logs not really verbose

I’m trying to deploy a Kong API gateway backed up with Postgres to Kubernetes subrouting to a Docker container.

After executing the step of kubectl -n kong apply -f kong-control-plane-postgres.yaml , then try to
kubectl get pods -n kong , it returns the following pods which is always in Initializing status

kong-control-plane-6c8b4c89b7-heist 0/1 Init:0/2 0 19s
kong-control-plane-bootstrap-heist20/1 Init:0/1 0 19s
Postgres-heist 1/1 Running 0 84s

Try to debug the container through kubectl logs kong-control-plane-bootstrap-bgfmg wait-for-postgres -n kong , it shows the following error:

nc: bad address ‘postgres.kong.svc’
waiting for db

Then just hangs through Travis CI? any ideas…


This is more of a Kong problem, but I’ll be glad to help you here, and honestly this is a little bit out of Travis CI’s wheelhouse.

The Kong control plane manifests a subroutine to bootstrap, this in turn pushes to the datastore. Can you check if it that ran or even was successful?

kubectl get job -n kong

You might want to rev-parse in git. You need to verify that exactly one parameter is provided, and that it can be turned into a raw 20-byte SHA-1 that can be used to access the object database. If so, emit it to the standard output; otherwise, error out.

git rev-parse --short HEAD
(commit number)

For more of a verbose output, you can run:

git fsck | awk '{print $3}' | xargs -I '{}' git show {} >> kong_contents
kubectl apply -f kong-namespace.yaml
kubectl create -f postgres.yaml
kubectl get all -n kong #waited for postgres to be ready
kubectl -n kong apply -f kong-control-plane-postgres.yaml
kubectl get all -n kong

If you’re still having difficulty swap the init container with something you’re comfortable debugging from (Busybox, Ubuntu or even something like HashiCorp’s Vagrant.) Then change the command to tail -f /dev/null and then kubectl exec into it and try and determine why it can’t reach PostGRES.

You may want to checkout the documentation on Kong’s website.

1 Like

Hey @montana,

You’re amazing! Is there anyway I can merge the whole branch, but only really specific commits from the other branch.

When running git fsck | awk this was the fix, but now I have this quagmire.

Yes there is a way @HILLBILLYHeisT,

Just use the git cherry-pick command. Ultimately the hash uniquely defines the commit - regardless of what branch it’s in.

So for example, you’ll run git cherry-pick then the commit you’re looking for:

git cherry-pick 123456

Now check, remove the temp branch and push:

git log
git branch -D otherrepo-master
git push origin master