I have a statefulset that I need to run using the host network, purely for performance reasons. But I also want to be able to reference service-name endpoints. Is it possible to do this? ClusterFirstWithHostNet does not work because it doesn't prioritize using the host's network. The dnsConfig configuration might be promising, but I don't know how I would configure it to do what I'm asking about.
Is it possible to configure a pod to prioritize using `hostNetwork` but still reference internal service endpoints?
196 Views Asked by Mike At
1
There are 1 best solutions below
Related Questions in KUBERNETES
- Golang == Error: OCI runtime create failed: unable to start container process: exec: "./bin": stat ./bin: no such file or directory: unknown
- I can't create a pod in minikube on windows
- Oracle setting up on k8s cluster using helm charts enterprise edition
- Retrieve the Dockerfile configuration from the Kubernetes and also change container Java parameter?
- Summarize pods not running, by Namespace and Reason - I'm having trouble finding the reason
- How to get Java running parameters from Spring Boot running inside container in pod where no ps exist
- How do we configure prometheus server to scrape metrics from a pod with Istio sidecar proxy?
- In rke kube-proxy pod is not present
- problem with edge server registration in Eureka
- Unable to Access Kubernetes LoadBalancer Service from Local Device Outside Cluster
- Kubernetes cluster on GCE connection refused error
- Based on my experience, I've outlined the Kubernetes request flow. Could someone please add or highlight any points I might have overlooked?
- how to define StackGres helm chart "restapi" values to use internal LoadBalancer - AWS EKS
- Python3.11 can't open file [Errno 2] No such file or directory
- Cannot find remote pod service - SERVICE_UNAVAILABLE
Related Questions in AMAZON-EKS
- how to define StackGres helm chart "restapi" values to use internal LoadBalancer - AWS EKS
- AWS EKS Fargate pod scheduling issue with Prometheus deployment
- EKS AMI kernel debug symbols
- How to add Addons to EKS with Pulumi
- Intermittent ec2ApiErrCount in EKS CNI Metrics Helper
- Implementing Multi-Tenant Access Restriction with Keycloak and Istio
- Any example to upgrade an aws eks cluster using github actions workflow on a self-hosted runner outside of cluster?
- How to set nodeSelector for controller for AWS EKS aws-ebs-csi-addon?
- Insight: Deprecated APIs removed in Kubernetes v1.29
- Multi attach error in AWS EKS deployment (rolling update)
- How to pass or allow spark-operator pod in eks to access AWS resources like S3
- Grpc.Core.RpcException: Status(StatusCode="PermissionDenied", Detail="Bad gRPC response. HTTP status code: 403")
- "413 Request Entity Too Large" when serving Angular web (client side) with Nginx
- Airflow `sensing task` queued but not run. What is the problem?
- Asynchronous dumping of requests received on FASTAPI using background tasks into a Kinesis Stream is increasing the response time drastically
Related Questions in KUBERNETES-DNS
- Pods on Windows worker can't reach CoreDns
- How do I change the external DNS not kubernetes(CoreDNS)?
- Block externa-IP resolving in kubernetes
- How to update DNS configuration of K8S Pod
- How to set up DNS for Ingress with MetallLB not work?
- Why Kubernetes Not Able to access ip by the Domain Name?
- Is it possible to configure a pod to prioritize using `hostNetwork` but still reference internal service endpoints?
- Istio: RequestAuthentication jwksUri does not resolve internal services names
- Kubernetes - Calling Microservice by Service Name
- kubernetes dns list all ips for service
- kubernetes-cli command to get dns of a kubernetes resource
- K8s Statefulset DNS
- How to get FQDN DNS name of a kubernetes service?
- Kubernetes jenkins agent fails & shows - tcpSlaveAgentListener
- DNS for kubernetes pods and airflow worker logs
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is a community wiki answer. Feel free to expand it.
It might be possible if the app can select random port to listen during start and change if port is busy. However, Kubernetes is not involved in the selecting port for the application.
Statefulsetrequires a headless service, so it doesn't have an IP and works as a set of DNS records in coredns. A record would probably contain the same IP for the replicas on the same node, but SRV record may actually provide a proper endpoint.For further reference, please take a look at the below sources:
How do I get individual pod hostnames in a Deployment registered and looked up in Kubernetes?
SRV records