Giter VIP home page Giter VIP logo

Comments (7)

dixudx avatar dixudx commented on June 2, 2024

Error: Kubernetes cluster unreachable: Get "https://104.197.186.74/version?timeout=32s": x509: certificate has expired or is not yet valid: current time 2023-08-30T17:38:06+05:30 is before 2023-08-30T12:45:29Z

Actually it is NOT a problem of Clusternet.

The certificates of Kubernetes clusters got expired. You can try multiple ways to fix the expired certificates, such as

from clusternet.

shekhar250723 avatar shekhar250723 commented on June 2, 2024

@dixudx It has been resolved automatically after the re-installation.

But I have some doubts. I have created one parent and 2 chilld cluster but whenever I tried to check the status of first child cluster through parent cluster then it's working fine but I got same status in another child cluster.

Second if I tried to switched the child cluster directly. Then I didn't check the created ns which I have created through parent cluster and getting error.

Error 1- Created the ns in first child cluster but it's also visible in another child cluster

$ kubectl clusternet --cluster-id=407df4f8-09f3-4353-bd13-0bbe23374669 --kubeconfig=.kube/config create ns developer-namespace
namespace/developer-namespace created

$ kubectl get clsrr
NAME                                              CLUSTER ID                             STATUS     AGE
clusternet-3ee7dab1-02c5-458d-8f3a-9e48d30af202   3ee7dab1-02c5-458d-8f3a-9e48d30af202   Approved   10m
clusternet-407df4f8-09f3-4353-bd13-0bbe23374669   407df4f8-09f3-4353-bd13-0bbe23374669   Approved   16h

$ kubectl clusternet --cluster-id=407df4f8-09f3-4353-bd13-0bbe23374669 --kubeconfig=.kube/config get ns
NAME                  STATUS   AGE
clusternet-9gw4k      Active   10m
clusternet-reserved   Active   16h
clusternet-system     Active   16h
clusternet-szc2b      Active   16h
default               Active   16h
developer-namespace   Active   19s
gmp-public            Active   16h
gmp-system            Active   16h
kube-node-lease       Active   16h
kube-public           Active   16h
kube-system           Active   16h

$ kubectl clusternet --cluster-id=3ee7dab1-02c5-458d-8f3a-9e48d30af202 --kubeconfig=.kube/config get ns
NAME                  STATUS   AGE
clusternet-9gw4k      Active   11m
clusternet-reserved   Active   16h
clusternet-system     Active   16h
clusternet-szc2b      Active   16h
default               Active   16h
developer-namespace   Active   26s
gmp-public            Active   16h
gmp-system            Active   16h
kube-node-lease       Active   16h
kube-public           Active   16h
kube-system           Active   16h 

Error 2- Getting error if I switched directly the child cluster and tried to check the created ns which is done by parent clusternet command.

$ kubectl clusternet get ns
Error from server (NotFound): Unable to list "/v1, Resource=namespaces": the server could not find the requested resource (get namespaces)

from clusternet.

dixudx avatar dixudx commented on June 2, 2024

For error 1

It seems that the same cluster is registered twice.

For error 2

You are not specifying a valid kubeconfig. By default $HOME/.kube/config is used.

from clusternet.

shekhar250723 avatar shekhar250723 commented on June 2, 2024

@dixudx As checked again, no same cluster has been registered twice. Could you please let me know any command? How can we check the status of it.

Second - Kubeconfig file is valid and updated the same as per the process but still getting the same error.

from clusternet.

dixudx avatar dixudx commented on June 2, 2024
$ kubectl clusternet --cluster-id=407df4f8-09f3-4353-bd13-0bbe23374669 --kubeconfig=.kube/config get ns
NAME                  STATUS   AGE
clusternet-9gw4k      Active   10m
clusternet-reserved   Active   16h
clusternet-system     Active   16h
clusternet-szc2b      Active   16h
default               Active   16h
developer-namespace   Active   19s
gmp-public            Active   16h
gmp-system            Active   16h
kube-node-lease       Active   16h
kube-public           Active   16h
kube-system           Active   16h

$ kubectl clusternet --cluster-id=3ee7dab1-02c5-458d-8f3a-9e48d30af202 --kubeconfig=.kube/config get ns
NAME                  STATUS   AGE
clusternet-9gw4k      Active   11m
clusternet-reserved   Active   16h
clusternet-system     Active   16h
clusternet-szc2b      Active   16h
default               Active   16h
developer-namespace   Active   26s
gmp-public            Active   16h
gmp-system            Active   16h
kube-node-lease       Active   16h
kube-public           Active   16h
kube-system           Active   16h 

They have exactly the same output.
@shekhar250723 Where is the child kubeconfig? I did not see any --child-kubeconfig flag here. Would you please follow the guide strictly? Thanks.

Moreover, flag --kubeconfig and --child-kubeconfig are different, they are for different clusters. You can tell them from the flag name.

from clusternet.

shekhar250723 avatar shekhar250723 commented on June 2, 2024

@dixudx Sorry for that, but it's not working and clusternet.io documentation is incomplete. Child config command is not working properly.

$kubectl clusternet --cluster-id=59a4d6ab-14de-473c-8e1d-500bc5cdbe81 --kubeconfig=.kube/config  get ns
NAME                  STATUS   AGE
clusternet-gpv86      Active   18h
clusternet-reserved   Active   18h
clusternet-system     Active   18h
default               Active   42h
gmp-public            Active   42h
gmp-system            Active   42h
kube-node-lease       Active   42h
kube-public           Active   42h
kube-system           Active   42h
dev-link               Active   126m

Error

$ kubectl clusternet --cluster-id=59a4d6ab-14de-473c-8e1d-500bc5cdbe81 --child-kubeconfig=.kube/config get ns
error: the server doesn't have a resource type "ns"

--child-kubeconfig command not working

from clusternet.

dixudx avatar dixudx commented on June 2, 2024

Firstly --child-kubeconfig and --kubeconfig are different flags. I am not meaning that you can only use either of them. Flag --kubeconfig will normally load from $HOME/.kube/config by default, unless you're explicitly specifying one.

If you're not clear about the default values, I'd suggest you adopt an explicit setting as follows,

$ kubectl clusternet --cluster-id=59a4d6ab-14de-473c-8e1d-500bc5cdbe81 --kubeconfig=[your parent cluster kubeconfig path]  --child-kubeconfig=[your child cluster kubeconfig path] get ns

Secondly, normally you should have different kubeconfig files for flag --kubeconfig and --child-kubeconfig respectively, unless you know exactly that you register parent cluster to itself as a child cluster.

Last but not the least, you can learn more from https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/, where you could have a better understanding of kubeconfig files, default locations, basic usages ,etc.

Currently what you've met now are solely Kubernetes usage problems. Please try to know exactly the command you're issuing.

from clusternet.

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.