Comments (6)
Thanks for this @DazWilkin.
Here is logic for discovering port for the default server:
Line 79 in 89196c8
If port is not in the config, and environment variable CLOUDPROBER_PORT is not defined, cloudprober will use 9313 (DefaultServerPort).
What error do you get when you don't specify the environment variable CLOUDPROBER_PORT.
from cloudprober.
I looked at cloudprober.go
but it wasn't immediately obvious to me why it doesn't work.
Curiously, the container works outside of Kubernetes.
If I exclude the environment variable from the deployment file on Kubernetes, it generates:
cloudprober.go:164] Error initializing cloudprober. Err: failed to parse default port from the env var: CLOUDPROBER_PORT=tcp://10.102.246.132:9313
If I include:
env:
- name: CLOUDPROBER_PORT
value: "9313"
It works.
from cloudprober.
Apparently Kubernetes automatically sets the environment variable "_PORT"
https://kubernetes.io/docs/concepts/services-networking/service/#environment-variables
This is colliding with the Cloudprober's default port environment variable name, CLOUDPROBER_PORT.
CLOUDPROBER_SERVICE_PORT would have been more compatible with Kubernetes. I'll document it for now and possibly change the environment variable name later.
from cloudprober.
IDNKT!
I've confirmed this is the root-cause in my case.
I renamed the service in my deployment (cloudprober
→xcloudprober
) and removed the env for CLOUDPROBER_PORT
and the deployment succeeded.
from cloudprober.
Filed #252 to modify CLOUDPROBER_PORT parsing to work with Kubernetes.
from cloudprober.
Closing this issue now.
In case someone adopts the ConfigMap proposal described by Daz at the top, I'd also recommend to look at #149 (comment) for how to rollout ConfigMap updates.
from cloudprober.
Related Issues (20)
- Running On Kubernetes pod encounter an error on OpenStack HOT 6
- Support allowed_metrics_regex in Prometheus surfacer HOT 1
- Unable to connect gRPC for dynamic configuration of cloudprober
- Support specifying prober interval / timeouts as durations HOT 1
- RDS Kubernetes Endpoints include pod name HOT 5
- HTTP probe with `file_targets` can begin first iteration with 0 targets HOT 1
- GKE Logging StackDriver Metadata error HOT 11
- Default behaviour of RDS Filter and Probing multiple matched services HOT 4
- Datadog surfacer makes cloudprober binary too big HOT 2
- [Documentation] Document file surfacer output HOT 1
- Reduce resource consumption when using file discovery with same file in multiple probes HOT 23
- Document templating language HOT 5
- Implement caching option in RDS protocol HOT 1
- Allow debugging configuration templates, and playbook HOT 3
- file_targets for probe options HOT 5
- Metrics not updated on external probe timeout HOT 6
- `additional_label`'s are missing in custom metrics of `EXTERNAL` probe HOT 3
- Socket: permission denied when run in Kubernetes HOT 2
- Failed to publish metrics to cloudwatch: MissingRegion: could not find region configuration HOT 3
- Improve documentation for cloudwatch surfacer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudprober.