Comments (7)
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
- https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/
- https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/
- ...
from clusternet.
@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.
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.
@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.
$ 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.
@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.
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)
- Getting error whenever tried to check the logs of Clusternet-Agent pod through Kubernetes command HOT 22
- Adopting a Standardized ClusterInventory API from SIG Multi-Cluster HOT 1
- Unable to manage child clusternet through parent clusternet HOT 11
- Who is Adopting Clusternet? | Clusternet 使用者征集 HOT 4
- Increase code coverage HOT 4
- HelmChart type resources cannot be deployed when clusternet-agent sets AppPusher=false HOT 1
- Add post-join actions after child cluster joins in parent cluster successfully. HOT 2
- controller-manager will panic when the length of bindingClusters and replicas in subscription are not equal
- helm deploy failed HOT 4
- Replace ApplyResourceWithRetry with ApplyResource HOT 2
- Optimized performance of clusternet in large-scale CR scenarios.
- add metrics and pprof server for controller-manager
- Support Scheduling Priority and Preemption HOT 4
- for dividing scheduling, manifest changes should not directly trigger the updates of base objects HOT 1
- does clusternet support Multi-Cluster Controller HOT 5
- The default priority of localization for dynamic scheduling is 1000(the highest), which is not flexible HOT 2
- when we watch wrapper resource, sometimes we can not receive event
- shadow api can not access pv which dynamicly created by pvc HOT 9
- Installation issues: How to add other sub-clusters to the parent cluster HOT 6
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 clusternet.