Is it possible to communicate with Kubernetes service through its DNS?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
I have been playing with buildkit and kubernetes as I'm looking for a solution to build docker images on top of k8s (in scale) especially due to the latest k8s changes regarding the docker daemon.
I'm curious to know if it is possible to do something like --addr tcp://serviceName.namespace.svc.cluster.local:1234 , i.e:
$ kubectl port-forward service/buildkitd 1234
$ buildctl \
--addr tcp://serviceName.namespace.svc.cluster.local:1234 \
--tlscacert .certs/client/ca.pem \
--tlscert .certs/client/cert.pem \
--tlskey .certs/client/key.pem \
build --frontend dockerfile.v0 --local context=/path/to/dir --local dockerfile=/path/to/dir
The idea here is to be able to communicate with the deployment & service example through its service DNS instead of using a specific pod nam with kube-pod
Within an automdated CICD setup, this would make a lot of sense, especially when there's a need to scale the workers as much as possible without editing the build and release process (i.e: without changing the --addr:... configuration).
Thank you
Shaked
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/kubernetes/deployment+service.privileged.yaml and the kube-pod address handling mentioned in the issue. Check how buildctl processes --addr and whether the Kubernetes service DNS example can reach the deployment; done means establishing whether this is supported and identifying the required change or documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100