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

ReqwestError #5

Open
leiyang opened this issue Jan 15, 2021 · 4 comments
Open

ReqwestError #5

leiyang opened this issue Jan 15, 2021 · 4 comments

Comments

@leiyang
Copy link

leiyang commented Jan 15, 2021

on my ubuntu os
Error: ReqwestError(reqwest::Error { kind: Request, url: Url { scheme: "https", host: Some(Ipv4(122...*)), port: Some(6443), path: "/api/v1/namespaces/default/pods", query: Some(""), fragment: None }, source: hyper::Error(Connect, Custom { kind: Other, error: "invalid dnsname" }) })

@Dentrax
Copy link

Dentrax commented Jan 15, 2021

I'm getting exactly same error with macOS. @edrevo

$ suspicious-pods --version

suspicious-pods 1.1.0
$ KUBECONFIG=/Users/furkan/.kube/config-foo suspicious-pods

Error: ReqwestError(reqwest::Error { kind: Request, url: Url { scheme: "https", host: Some(Ipv4(10.X.XX.XXX)), port: Some(XXXX), path: "/api/v1/namespaces/default/pods", query: Some(""), fragment: None }, source: hyper::Error(Connect, Custom { kind: Other, error: "invalid dnsname" }) })
$ KUBECONFIG=/Users/furkan/.kube/config-foo kubectl get --raw='/readyz?verbose'

All is OK.

@edrevo
Copy link
Owner

edrevo commented Jan 15, 2021

Thanks for the report! Could you share an expired kubeconfig? I am trying to understand what difference between your kubeconfigs and mine might be causing this. Are you using a DNS for the server or an IP?

@Dentrax
Copy link

Dentrax commented Jan 15, 2021

Looks like this:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: XXX
    server: https://10.XX.XXX.XXX:XXXX
  name: foo
contexts:
- context:
    cluster: foo
    namespace: my-namespace
    user: kubernetes-admin
  name: kubernetes-admin@foo
current-context: kubernetes-admin@foo
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    token: XXX

@kazk
Copy link

kazk commented Feb 10, 2021

kube with rustls-tls feature doesn't support cluster with IP address at the moment. This is a rustls limitation which in turn comes from webpki.

See kube-rs/kube#153 a possible workaround.

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

4 participants