bitnami / bitnami/sealed-secrets

Timeout on fetch cert

Open
#368 25 comments 0 reactions 0 assignees View on GitHub
backlog bug
Dominant language
Go
Stars
9.3k
Forks
776
Avg merge
1d 13h
Merged PRs (30d)
30

Description

On initial installation on AWS I get the following timeout error:
```
$ kubeseal --fetch-cert -v 10000
I0302 16:37:04.066027 36889 loader.go:359] Config loaded from file: /home/pal/.kube/config
I0302 16:37:04.066646 36889 round_trippers.go:419] curl -k -v -XGET -H "Accept: application/x-pem-file, */*" -H "User-Agent: kubeseal/v0.0.0 (linux/amd64) kubernetes/$Format" 'https://REDACTED.sk1.eu-west-1.eks.amazonaws.com/api/v1/namespaces/kube-system/services/http:sealed-secrets-controller:/proxy/v1/cert.pem'
I0302 16:37:34.951625 36889 round_trippers.go:438] GET https://REDACTED.sk1.eu-west-1.eks.amazonaws.com/api/v1/namespaces/kube-system/services/http:sealed-secrets-controller:/proxy/v1/cert.pem 503 Service Unavailable in 30884 milliseconds
I0302 16:37:34.951681 36889 round_trippers.go:444] Response Headers:
I0302 16:37:34.951696 36889 round_trippers.go:447] Audit-Id: 8f9e456d-7cd3-42e6-8871-bdd2e99608fa
I0302 16:37:34.951703 36889 round_trippers.go:447] Date: Mon, 02 Mar 2020 15:37:34 GMT
I0302 16:37:34.951775 36889 request.go:947] Response Body: Error: 'dial tcp 10.167.172.10:8080: i/o timeout'
Trying to reach: 'http://10.167.172.10:8080/v1/cert.pem'
I0302 16:37:34.951834 36889 request.go:1150] body was not decodable (unable to check for Status): couldn't get version/kind; json parse error: invalid character 'E' looking for beginning of value
error: cannot fetch certificate: the server is currently unable to handle the request (get services http:sealed-secrets-controller:)
```
I applied the controller at https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.9.8/controller.yaml and installed a precompiled cli from https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.9.8/kubeseal-linux-amd64

Some additional debugging:
```
$ kubectl --namespace kube-system describe svc sealed-secrets-controller
Name: sealed-secrets-controller
Namespace: kube-system
Labels: name=sealed-secrets-controller
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"name":"sealed-secrets-controller"},"name":"sealed-secrets-cont...
Selector: name=sealed-secrets-controller
Type: ClusterIP
IP: 172.20.209.255
Port: 8080/TCP
TargetPort: 8080/TCP
Endpoints: 10.167.172.10:8080
Session Affinity: None
Events:
```
I am able to do a port forward like so:
```
kubectl --namespace kube-system port-forward svc/sealed-secrets-controller 8081:8080
```
And then curl the cert:
```
$ curl localhost:8081/v1/cert.pem
-----BEGIN CERTIFICATE-----
....
```

Contributor guide

Open the contributing guide

Research direction

Start with the kubeseal --fetch-cert request and the controller.yaml service definition, then compare the Kubernetes service proxy path with the successful kubectl port-forward and curl path. Reproduce the timeout on AWS and inspect controller service reachability. Done means fetching the certificate works without requiring a port-forward, or the issue clearly documents an environment-specific limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli, devops, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.