Comments (13)
@rbarry82 can probably explain the ins and outs of this.
BTW, K8s itself does list the ports, for example alertmanager:
_ports = SimpleNamespace(api=9093, ha=9094)
# ...
self.service_patcher = KubernetesServicePatch(
self,
[
(f"{self.app.name}", self._ports.api, self._ports.api),
(f"{self.app.name}-ha", self._ports.ha, self._ports.ha),
],
)
$ k get services -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
wlcm2 am ClusterIP 10.152.183.114 <none> 9093/TCP,9094/TCP 5m48s
from cos-lite-bundle.
I know this does not solve your issue, but I still have some comments that I think are worthwhile to post.
I did not use Traefik as a ingress controller in this Microk8s deployment
Traefik can be used in tandem with any other ingress controller on the deployed MicroK8s. It is, right now, the only ingress controller that fully supports the functionality needed by COS Lite.
other k8s charm services deployed on the same Microk8s
I would not recommend this topology for anything production or production-like. I totally get why this is tempting to keep the amount of moving parts as low as possible, but for COS Lite - or any observability solution really - to interfere as little as possible with your workloads, and more importantly: vice versa, we recommend you to always deploy it on an isolated MicroK8s cluster.
from cos-lite-bundle.
@sed-i Thank you that is good information to manually create the ingress resources.
Still, I am guessing Juju is be ignoring this information when running juju expose
. Otherwise, It should create the ingress resources like it does with mattermost-k8s, discourse-k8s and others that show the ports on Juju.
from cos-lite-bundle.
Traefik can be used in tandem with any other ingress controller on the deployed MicroK8s. It is, right now, the only ingress controller that fully supports the functionality needed by COS Lite.
@simskij I started deploying Traefik just like the full bundle renders. However, I got Traefik charm stuck on waiting status with a message like "not obtaining a gateway ip". I assumed it was a conflict with the existing ingress controller from Microk8s ingress addon and did not dig much into it. If Traefik can co-exist with this plugin then that might be another issue I have to take a look back.
from cos-lite-bundle.
Traefik can be used in tandem with any other ingress controller on the deployed MicroK8s. It is, right now, the only ingress controller that fully supports the functionality needed by COS Lite.
@simskij I started deploying Traefik just like the full bundle renders. However, I got Traefik charm stuck on waiting status with a message like "not obtaining a gateway ip". I assumed it was a conflict with the existing ingress controller from Microk8s ingress addon and did not dig much into it. If Traefik can co-exist with this plugin then that might be another issue I have to take a look back.
Yeah that error message might not be the best tbh. What it means is thay you lack a source of external IPs, like MetalLB
from cos-lite-bundle.
I would not recommend this topology for anything production or production-like. I totally get why this is tempting to keep the amount of moving parts as low as possible, but for COS Lite - or any observability solution really - to interfere as little as possible with your workloads, and more importantly: vice versa, we recommend you to always deploy it on an isolated MicroK8s cluster.
@simskij Thank you this is valuable information to take into account for other deployments. I did not considered it for two reasons. One is that I have a really small deployment intended for demo purposes. And the other reason is I tried using COS to monitor some VM charmed workloads and hit into this caveat, which seems I would need to either use just one juju controller for the whole deployment or do some extra configuration when bootstraping the N controllers so that they can discover the pods network direction.
from cos-lite-bundle.
Traefik can definitely exist with the other ingress controller, assuming that your load balancer has more than one IP in the pool (since nginx will otherwise bind to 80/443, and Traefik won't be able to).
I've never really checked into whether juju expose
works with OF/sidecar charms other than vague memories of hearing that it actually doesn't work as expected, but in any case, the default nginx ingress does "normal" k8s service-based-routing, which isn't appropriate for a lot of what's in sidecars right now for various reasons.
One controller for the whole deployment works, as long as that controller is publicly routable. The other configuration actually isn't about the pod's network direction, and more due to Juju not "knowing" what external address it should use for the controller, ala juju bootstrap microk8s coscontroller --config controller-service-type=external --config controller-external-name=mydnsname --config controller-external-ips=[x.x.x.x, y.y.y.y]
, so it defaults to handing you a k8s-internal, non-routable DNS name (and IP, probably) which can't be resolved from outside the cluster.
What is the actual "error" from the controller when you try to consume?
from cos-lite-bundle.
This is currently blocked pending a native way of opening ports using Juju/OF.
from cos-lite-bundle.
from cos-lite-bundle.
This could nominally be tested on a current version of Juju by using juju run ...
to invoke open-port
explicitly, to see if it actually percolates through the controller to be rendered when juju status
interrogates it. At a glance, it looks like it might, but it may need a follow-up patch from Juju to resolve, even once the work is done in OF.
from cos-lite-bundle.
@benhoyt - do you have any suggestion as to how we could accomplish this for sidecar charms?
from cos-lite-bundle.
@simskij Yes, now that canonical/operator#905 is merged (and included in ops 2.1.0+) you should be able to use Unit.open_port()
in the cos-lite charms. This will tell Juju to open those ports on the K8s end. I've just grepped the codebases for each of the cos-lite charms, and none of them are using open_port
yet.
from cos-lite-bundle.
There are some related juju issues still open:
We should use open_port, but it may still not be visible in juju status.
from cos-lite-bundle.
Related Issues (20)
- Integrate the COS charms with Loki HOT 1
- Enhance promotion CI
- Prometheus charm comes up and then goes down after relations from another model are added. HOT 16
- Add bundle test to cover custom relabel configs
- Implement access control for Grafana
- Tracking issue for Juju 3.6 LTS related changes
- Force https redirect for each charm integrated with Traefik HOT 16
- Fix how `kubectl top pod` is called
- Merge offers overlay into the bundle HOT 2
- Tracking issue for TLS
- Grafana Admin password not retrieveable. HOT 2
- Integration tests for TLS HOT 2
- Replace the test bundle oci images with our ROCKs using the dev-tag on ghcr.io
- Document external dependencies for COS lite HOT 5
- `storage-small-overlay.yaml` has bigger size than the default HOT 1
- Add disk space alerts to loki, prometheus
- Incorrect command for fetching/organizing endpoints HOT 1
- Integration tests keep failing because prometheus fails to scrape grafana
- Prometheus stuck in installing charm software HOT 2
- Support use of certificates provided by third parties HOT 2
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 cos-lite-bundle.