Comments (7)
Seems like nslookup
does purely DNS resolution but when you just add to the hosts file that's not populated in DNS. For /etc/hosts
you should use ping
or at least that's what https://askubuntu.com/questions/627906/why-is-my-etc-hosts-file-not-queried-when-nslookup-tries-to-resolve-an-address says.
from cluster-api-provider-nested.
@gyliu513 could you try to run nslookup cluster-sample-apiserver
and share the output?
from cluster-api-provider-nested.
@charleszheng44 it appears macOS doesn't support HOSTALIASES
- https://apple.stackexchange.com/questions/356972/how-can-i-make-macos-respect-hostaliases-environment-variable
from cluster-api-provider-nested.
/kind bug
from cluster-api-provider-nested.
@christopherhein @charleszheng44 seems Linux also does not work.
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# cat /root/.hosts
127.0.0.1 cluster-sample-apiserver
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# env | grep HOST
HOSTALIASES=/root/.hosts
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# nslookup cluster-sample-apiserver
Server: 172.16.200.52
Address: 172.16.200.52#53
** server can't find cluster-sample-apiserver: NXDOMAIN
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# kubectl --kubeconfig kubeconfig get all -A
Unable to connect to the server: dial tcp: lookup cluster-sample-apiserver on 172.16.200.52:53: no such host
from cluster-api-provider-nested.
Interesting, yeah I think we just need to have this say the instructions (for now) should tell you to just add it to /etc/hosts
so it will actually work or at least that is what I do.
from cluster-api-provider-nested.
Thanks @christopherhein , /etc/hosts works for me, but not sure why nslookup cluster-sample-apiserver
always failed.
Any side impact if we update /etc/hosts
?
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# kubectl --kubeconfig kubeconfig get all -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 10.32.0.1 <none> 443/TCP 159m
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# nslookup cluster-sample-apiserver
Server: 172.16.200.52
Address: 172.16.200.52#53
** server can't find cluster-sample-apiserver: NXDOMAIN
root@gyliu-dev21:~/go/src/github.com/kubernetes-sigs# cat /etc/hosts
127.0.0.1 localhost
127.0.0.1 cluster-sample-apiserver
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.16.164.91 gyliu-dev21.fyre.ibm.com gyliu-dev21
from cluster-api-provider-nested.
Related Issues (20)
- VirtualCluster should support to sync specific conditions of PodStatus from tenant to super HOT 14
- ✨ Projected ServiceAccount Support HOT 24
- 🐛 Add ReadHeaderTimeout values HOT 1
- Resource already exists and the UID is different should not requeue HOT 10
- update (virtual cluster) validation webhook registration to support admission.../v1 HOT 9
- Support exposing single annotations/labels via env downward API
- Pod Checker occasionally deletes vPods unexpectedly HOT 2
- Consider extending conversations package to work with vNodes HOT 7
- 🐛 Pod Mutator has order requirements HOT 1
- Pod DWS support container Commands&Args update HOT 1
- ✨PersistentVolumeClaim support UWS status update HOT 4
- [VirtualCluster] Error creating: failed to list services from cluster xxxxx cache: service is not ready HOT 6
- ✨ Enhancement for virtual cluster DNS HOT 1
- 🐛[VC] Failed to do port-forward for a pod in virtual cluster HOT 1
- ❓ [VC] Why pod with nodeName is not supported for now? HOT 6
- Unable to init Cluster with the nested provider HOT 5
- Add Dedicated Node Support and Customized Scheduler in VirtualCluster using Customized Syncers HOT 6
- CAPI v1.5.0-beta.0 has been released and is ready for testing HOT 4
- CAPN doesn't seem to work outside of a kind scenario HOT 4
- CAPI v1.6.0-beta.0 has been released and is ready for testing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cluster-api-provider-nested.