Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got "502 Bad Gateway" issue with Nginx with canonical-kubernetes spell while running addon #155

Open
shrajfr12 opened this issue Mar 1, 2018 · 1 comment

Comments

@shrajfr12
Copy link
Contributor

Running conjure-up from edge channel for canonical-kubernetes spell gave the following error while executing a kubectl command to create a storage class in the addon after-deploy script.

Error from server (InternalError): an error on the server ("\r\n<title>502 Bad Gateway</title>\r\n<body bgcolor="white">\r\n

502 Bad Gateway

\r\n
nginx/1.10.3 (Ubuntu)\r\n\r\n") has prevented the request from succeeding

the same command execute fine on the command line.

@Cynerva
Copy link
Contributor

Cynerva commented Mar 1, 2018

This is a reply from kubeapi-load-balancer indicating that kube-apiserver is unreachable.

This happens normally during cluster deployment, and also briefly when changing certain config options on the charm. We can't really get around the fact that kube-apiserver has to be restarted occasionally; however, ideally, the cluster should be in a settled state while addon code is running.

In this case, I suspect that the restart was caused by a config change to kubernetes-master in the enable-cni step:

juju config -m $JUJU_CONTROLLER:$JUJU_MODEL kubernetes-master \
api-extra-args="$api_extra_args" \
controller-manager-extra-args="$controller_manager_extra_args"

Would it make sense for the enable-cni step to wait for everything to settle after changing the config? I think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants