sealed-secrets: Cannot fetch certificate: no endpoints available for service "http:sealed-secrets-controller:"
Hello! We’ve installed the latest sealed-secrets via helm charts and noticed an issue when trying to use kubseal.
kubeseal --fetch-cert
error: cannot fetch certificate: no endpoints available for service "http:sealed-secrets-controller:"
After digging a bit deeper i uncovered a PR that was merged that fixed this exact issue, but it doesn’t look like it’s made its way into this repo: https://github.com/helm/charts/pull/22097
This can be checked by running:
- kubectl proxy
curl http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/http:sealed-secrets:/proxy/v1/cert.pem
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "no endpoints available for service \"http:sealed-secrets:\"",
"reason": "ServiceUnavailable",
"code": 503
}%
If you add the http protocol for port it works: curl http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/http:sealed-secrets-controller:http/proxy/v1/cert.pem
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 18
Also seeing the same problem after upgrading to the latest version. Manually removing the
name
and settingtargetPort: 8080
on the service got things working again.Hi everyone! I’m glad to announce that we just released a new version of Sealed Secrets that address this issue:
v0.17.2
Please give it a try when you have a chance! Find more info at:To easily apply the aforementioned fix to the service:
kubectl -n kube-system patch svc sealed-secrets-controller --type='json' -p='[{"op": "remove", "path": "/spec/ports/0/name"}, {"op": "replace", "path": "/spec/ports/0/targetPort", "value":8080}]'
Hi everyone!
Thanks so much for reporting this! The changes we recently introduced at https://github.com/bitnami-labs/sealed-secrets/pull/690 (introducing a name for the http port exposed in the service) broke the compatibility with kubeseal.
This should be fixed by this PR: https://github.com/bitnami-labs/sealed-secrets/pull/648
In the meantime, you can workaround this by removing the
name
and settingtargetPort: 8080
as @glitchcrab pointed out.Hi @emenylouu,
I installed
sealed-secret
via the helm chart on a fresh k8s cluster (docker-desktop 1.25) and it works fine:Would need more input from you regarding the way you installed.
Check maybe the endpoints?
And the endpoint itself:
Hope it helps to solve the issue.
I’ve downgraded helm release to
v1.16.1
and it works again.