GithubHelp home page GithubHelp logo

apiserver received an error that is not an metav1.Status: &errors.errorString{s:"error dialing backend: tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not xxx"} about k3s HOT 4 CLOSED

wang-xiaowu avatar wang-xiaowu commented on May 25, 2024
apiserver received an error that is not an metav1.Status: &errors.errorString{s:"error dialing backend: tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not xxx"}

from k3s.

Comments (4)

brandond avatar brandond commented on May 25, 2024

tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not 10.1.4.13"

K3s doesn't generate any certificates that are valid for only the loopback address, but not any other IPs. I also see that you've set the egress-selector mode to disabled; why? Do you perhaps have a http proxy configured in your environment? I'm not sure what exactly the apiserver is talking to here that has this invalid certificate but I don't think it's an internal component.

from k3s.

wang-xiaowu avatar wang-xiaowu commented on May 25, 2024

tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not 10.1.4.13"

K3s doesn't generate any certificates that are valid for only the loopback address, but not any other IPs. I also see that you've set the egress-selector mode to disabled; why? Do you perhaps have a http proxy configured in your environment? I'm not sure what exactly the apiserver is talking to here that has this invalid certificate but I don't think it's an internal component.

the reason of disable egress-selector is from another issue : #5897
and there's not http proxy config in my env
BTW i have deleted that line in my /etc/systemd/system/multi-user.target.wants/k3s.service and reloaded, but not worked

from k3s.

wang-xiaowu avatar wang-xiaowu commented on May 25, 2024

i did a testing, use kubernetes-client to operate k3s with config file, like this, and replace 127.0.0.1 to 10.1.4.13, it worked. i was thinking maybe there's something wrong i ignored inside k3s

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: xxx
    server: https://127.0.0.1:6443
  name: default
contexts:
- context:
    cluster: default
    user: default
  name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
  user:
    client-certificate-data: xxx
    client-key-data: xxx

from k3s.

wang-xiaowu avatar wang-xiaowu commented on May 25, 2024

another phenomenon: operation only does not work in the node which metrics-server was deployed
after resinstalling the metrics-server, it has worked

from k3s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.