Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Nginx controller should work with local-up-cluster #1459

Closed
bprashanth opened this issue Aug 1, 2016 · 2 comments · Fixed by #1467
Closed

Nginx controller should work with local-up-cluster #1459

bprashanth opened this issue Aug 1, 2016 · 2 comments · Fixed by #1467

Comments

@bprashanth
Copy link

It's the best way to get people familiar with ingress, but currently it fails with:

I0801 22:40:56.415722       1 main.go:99] Using build: https://github.com/bprashanth/contrib.git - git-b195d9b
F0801 22:41:26.419623       1 main.go:128] unexpected error getting runtime information: timed out waiting for the condition

I think this is because there is no service account. It should just default to using localhost:8080, i thought the client library did this but i might be wrong. I thought clientConfig would default to this if nothing else worked, but obviously I'm wrong or missing an option. Can take a look when i have time to debug, but fyi @aledbf

@aledbf
Copy link
Contributor

aledbf commented Aug 1, 2016

It should just default to using localhost:8080, i thought the client library did this but i might be wrong.

I was expecting the same thing but the main contains https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/main.go#L125
which is true by default.

@bprashanth
Copy link
Author

hmm, setting it to false works? if so it's worth adding a snippet to the readme about this

k8s-github-robot pushed a commit that referenced this issue Aug 17, 2016
Automatic merge from submit-queue

[nginx-ingress-controller]: Use ClientConfig to configure connection

fixes #1459

Running with `docker run`:
```
core@localhost ~ $ docker run -it aledbf/nginx-third-party:0.31 bash
root@f6a96f46eab0:/# export KUBERNETES_MASTER=http://172.17.4.99:8080
root@f6a96f46eab0:/# /nginx-ingress-controller --default-backend-service=default/nginx-errors
I0802 14:44:58.604384       7 main.go:94] Using build: https://github.com/aledbf/contrib - git-5b9146a
W0802 14:44:58.605282       7 main.go:118] unexpected error getting runtime information: unable to get POD information (missing POD_NAME or POD_NAMESPACE environment variable)
I0802 14:44:58.607270       7 main.go:123] Validated default/nginx-errors as the default backend
W0802 14:44:58.611322       7 ssl.go:132] no file dhparam.pem found in secrets
I0802 14:44:58.615637       7 controller.go:1128] starting NGINX loadbalancer controller
I0802 14:44:58.615902       7 command.go:35] Starting NGINX process...
```

Running inside in a cluster:
```
I0802 14:47:50.254736       1 main.go:94] Using build: https://github.com/aledbf/contrib - git-5b9146a
I0802 14:47:50.254920       1 merged_client_builder.go:103] No kubeconfig could be created, falling back to service account.
I0802 14:47:50.343440       1 main.go:123] Validated default/nginx-errors as the default backend
W0802 14:47:50.343677       1 ssl.go:132] no file dhparam.pem found in secrets
I0802 14:47:50.347322       1 controller.go:1128] starting NGINX loadbalancer controller
I0802 14:47:50.347870       1 command.go:35] Starting NGINX process...
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/contrib/1467)
<!-- Reviewable:end -->
aledbf pushed a commit to aledbf/contrib that referenced this issue Nov 10, 2016
Automatic merge from submit-queue

[nginx-ingress-controller]: Use ClientConfig to configure connection

fixes kubernetes-retired#1459

Running with `docker run`:
```
core@localhost ~ $ docker run -it aledbf/nginx-third-party:0.31 bash
root@f6a96f46eab0:/# export KUBERNETES_MASTER=http://172.17.4.99:8080
root@f6a96f46eab0:/# /nginx-ingress-controller --default-backend-service=default/nginx-errors
I0802 14:44:58.604384       7 main.go:94] Using build: https://github.com/aledbf/contrib - git-5b9146a
W0802 14:44:58.605282       7 main.go:118] unexpected error getting runtime information: unable to get POD information (missing POD_NAME or POD_NAMESPACE environment variable)
I0802 14:44:58.607270       7 main.go:123] Validated default/nginx-errors as the default backend
W0802 14:44:58.611322       7 ssl.go:132] no file dhparam.pem found in secrets
I0802 14:44:58.615637       7 controller.go:1128] starting NGINX loadbalancer controller
I0802 14:44:58.615902       7 command.go:35] Starting NGINX process...
```

Running inside in a cluster:
```
I0802 14:47:50.254736       1 main.go:94] Using build: https://github.com/aledbf/contrib - git-5b9146a
I0802 14:47:50.254920       1 merged_client_builder.go:103] No kubeconfig could be created, falling back to service account.
I0802 14:47:50.343440       1 main.go:123] Validated default/nginx-errors as the default backend
W0802 14:47:50.343677       1 ssl.go:132] no file dhparam.pem found in secrets
I0802 14:47:50.347322       1 controller.go:1128] starting NGINX loadbalancer controller
I0802 14:47:50.347870       1 command.go:35] Starting NGINX process...
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/contrib/1467)
<!-- Reviewable:end -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants