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

Failed to resolve server nfs-server.default.svc.cluster.local: Name or service not known #418

Closed
Azbesciak opened this issue May 3, 2021 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@Azbesciak
Copy link

Azbesciak commented May 3, 2021

Hello, I tried to use example for NFS server, with the only change that I changed in nfs-server-rc.yml persistentVolumeClaim to

hostPath:
     path: /path/on/my/machine

I applied all NFS samples in a given order (rc, service, pv, pvc) but when I try to consume it via pvc in my job I receive an error like below

MountVolume.SetUp failed for volume "nfs" : mount failed: exit status 32 Mounting command: mount
Mounting arguments: -t nfs nfs-server.default.svc.cluster.local:/ /var/lib/kubelet/pods/5f4d4cce-ab59-44cb-9311-ef5fef696902/volumes/kubernetes.io~nfs/nfs
Output: mount.nfs: Failed to resolve server nfs-server.default.svc.cluster.local: Name or service not known

Do you have any idea how to solve this? I saw in kubernetes/minikube#3417 that I am not the one facing this issue, but I suppose that if you placed this as an example, it should work. I am using Docker for Windows with the following spec

  • docker v20.10.5
  • kubernetes v1.19.7
  • WSL 2, based on ubuntu 20.04

Also, I think I can but not sure - can I consume a single pv with multiple pvc, assuming ReadWriteMany? Worth to mention is that I aim to have jobs in different namespaces. I assume that each namespace must have at least dedicated for it pvc (I cannot have one global)? In general, I am looking for some substitute of hostPath - without NFS, but hostPath doest not work with multi-node cluster, so...

Thanks!

@Azbesciak
Copy link
Author

Hello, could you please take a look at this?

@adthonb
Copy link

adthonb commented May 18, 2021

@Azbesciak I have the same issue. You can't use the DNS of Service. Use Cluster-IP of Service instead. Change server: value in nfs-pv.yaml

@Azbesciak
Copy link
Author

Yup, take a look at kubernetes/minikube#3417 (comment)
But I rather expected some solution from k8s team.

@ronald
Copy link

ronald commented Jul 30, 2021

We also had no success with the fqdn, although it's in the example since 2019:
#295 by @IronPan

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 28, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 27, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@HusseinKabbout
Copy link
Contributor

I think it would be good to revert this commit, as it misleads the reader to believe that using the FQDN of the NFS service should work (even though it doesn't).

From my understand, currently there are only two somewhat reasonable solutions for this problem:

  1. Use the services IP instead of the FQDN
  2. Manually update the nodes hosts file (/etc/hosts) to make using the FQDN work

/reopen

@k8s-ci-robot
Copy link
Contributor

@HusseinKabbout: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

I think it would be good to revert this commit, as it misleads the reader to believe that using the FQDN of the NFS service should work (even though it doesn't).

From my understand, currently there are only two somewhat reasonable solutions for this problem:

  1. Use the services IP instead of the FQDN
  2. Manually update the nodes hosts file (/etc/hosts) to make using the FQDN work

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants