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

create endpoint with pod hostname #54119

Closed
like-inspur opened this issue Oct 18, 2017 · 3 comments
Closed

create endpoint with pod hostname #54119

like-inspur opened this issue Oct 18, 2017 · 3 comments
Labels
sig/network Categorizes an issue or PR as relevant to SIG Network.

Comments

@like-inspur
Copy link
Contributor

like-inspur commented Oct 18, 2017

I plan to deploy hadoop on kubernetes,when i deploy successfully,I need create service for ambari agent,so I can accees hdfs port from my external host。So I create endpoint and service like this:
kind: Endpoints
apiVersion: v1
metadata:
name: hdfs
namespace: bigdata
subsets:

  • addresses:
    • ip: 10.233.72.11
    • ip: 10.233.104.75
      ports:
    • port: 50070
      protocol: TCP

kind: Service
apiVersion: v1
metadata:
name: hdfs
namespace: bigdata
spec:
type: NodePort
ports:

  • protocol: TCP
    port: 50070
    targetPort: 50070
    nodePort: 31176

I need to get ip of ambari agent pod from kubernetes,can I create endpoint with pod hostname?

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Oct 18, 2017
@like-inspur
Copy link
Contributor Author

/sig endpoint for service

@grodrigues3
Copy link
Contributor

/sig network

@k8s-ci-robot k8s-ci-robot added the sig/network Categorizes an issue or PR as relevant to SIG Network. label Oct 25, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Oct 25, 2017
@thockin
Copy link
Member

thockin commented Oct 31, 2017

This is a help-request, not a bug. StackOverflow is probablybetter for you.

a) Use a selector, rather than manual endpoint creation
b) look at pod hostname and subdomain fields
c) create a headless service (clusterIP: None) with the same name as the pod subdomain

@thockin thockin closed this as completed Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/network Categorizes an issue or PR as relevant to SIG Network.
Projects
None yet
Development

No branches or pull requests

5 participants