-
Notifications
You must be signed in to change notification settings - Fork 198
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
Getting error in agent-clusternet in child clusternet #734
Comments
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 |
@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) |
For error 1It seems that the same cluster is registered twice. For error 2You are not specifying a valid kubeconfig. By default |
@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. |
$ 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. Moreover, flag |
@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"
|
Firstly 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 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. |
I am getting error in child-clusternet setup in GCP account.
Case 1- On my laptop
Getting below error in my GCP account.
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
Created new token but still getting error.
Note:- Parent cluster has been created in different project and child clusternet has been setup in different project.
Case 2- Different laptop
Getting error in child clusternet whenever tried to install agent-clusternet under of this. We are using child clusternet in different gcp and parent clusternet in different gcp account.
Agent-clusternet has been installed but getting below error in pod status
Error
kubectl get pod -n clusternet-system
NAME READY STATUS RESTARTS AGE
clusternet-agent-99d96988b-kclql 0/1 Error 2 (19s ago) 27s
clusternet-agent-99d96988b-kqd7x 0/1 Error 2 (19s ago) 27s
clusternet-agent-99d96988b-w7cjf 0/1 Error 2 (19s ago) 27s
Please help me on this.
The text was updated successfully, but these errors were encountered: