Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose a service from the internal dind deployment to the container #1

Open
rsassPwC opened this issue Jul 17, 2020 · 0 comments
Open

Comments

@rsassPwC
Copy link

Thanks for the great work you have done regarding the kubernetesinception! =)

I deployed inside the kind cluster an few pods including services to the pods. Is there a easy way to get easy to new service inside the kind pod and expose the service from the kind cluster to the container port that runs the "kind"

My approach is currently:

Service (using nodeport in my example) to the pod that runs kind
kind Service:
type: NodePort
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
nodePort: 30001

Pod that runs kind
kind pod:
ports:
- containerPort: 80

docker images with kind exposes port 80

service inside the kind pod
spec:
type: NodePort
ports:

  • name: http
    protocol: TCP
    port: 30000
    targetPort: 3000
    nodePort: 30000

pod inside the kind pod
spec:
ports:
- containerPort: 3000

kubectl port forwarding to localhost:80 inside the kind pod

How would you make a service from inside the kind pod expose to the deployed pod that runs kind. I would like to use the kind pod as a normal service that exposes only one service inside the kind pod.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant