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

如何在k8s内部部署karmada #1232

Closed
SZT0728 opened this issue Jan 11, 2022 · 18 comments
Closed

如何在k8s内部部署karmada #1232

SZT0728 opened this issue Jan 11, 2022 · 18 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@SZT0728
Copy link

SZT0728 commented Jan 11, 2022

看了karmada的启动脚本 都是对给定的一个k8s集群从外部进行部署karmada,有没什么方式可以在k8s集群内部部署karmada的??:

What do you think about this question?: 有官方开发者支持解答一下疑问吗

Environment:

  • Karmada version:
  • Kubernetes version:
  • Others:
@SZT0728 SZT0728 added the kind/question Indicates an issue that is a support question. label Jan 11, 2022
@RainbowMango
Copy link
Member

Have you checked Installing Karmada document?

@SZT0728
Copy link
Author

SZT0728 commented Jan 11, 2022

when i use kubectl-karmada install karmada,the output failed message is follow:

I0111 13:59:09.146318 477525 deploy.go:217] Update APIService 'v1alpha1.cluster.karmada.io'
F0111 13:59:09.149806 477525 deploy.go:95] apiservices.apiregistration.k8s.io "v1alpha1.cluster.karmada.io" not found

how can fix this??

@SZT0728
Copy link
Author

SZT0728 commented Jan 11, 2022

Environment:kubectl-karmada is build from source code which tag is v1.0.0
k8s server version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:02:01Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}

@RainbowMango
Copy link
Member

Oh, this is a bug that has been fixed by #1228.

I think you can re-build the kubectl-karmada with the latest code. Or, create the APIService below manually before run kubectl-karmada init:

apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1alpha1.cluster.karmada.io
labels:
app: karmada-aggregated-apiserver
apiserver: "true"
spec:
insecureSkipTLSVerify: true
group: cluster.karmada.io
groupPriorityMinimum: 2000
service:
name: karmada-aggregated-apiserver
namespace: karmada-system
version: v1alpha1
versionPriority: 10

@RainbowMango
Copy link
Member

cc @prodanlabs

@prodanlabs
Copy link
Member

Yes, unfortunately, a karmadactl needs to be compiled manually.

@prodanlabs
Copy link
Member

hi @RainbowMango
Is it possible to add a karmadactl to the release page, what do you think?

@orangedeng
Copy link

I went into the same issue and I can't continue to install karmada after init failed.

@RainbowMango
Copy link
Member

hi @RainbowMango Is it possible to add a karmadactl to the release page, what do you think?

We can't do that even it will work. But we can cut a new release v1.0.1 for this.

@prodanlabs
Copy link
Member

ll karmada after init failed.

you can compile the latest karmadactl from source,you need a golang environment.

git clone https://github.com/karmada-io/karmada.git
cd karmada
make kubectl-karmada  

@prodanlabs
Copy link
Member

What is the current-context of kubeconfig?
cat /root/.kube/k8s-cluster1.config | grep current-context | sed 's/: /\n/g' | sed '1d'

@RainbowMango
Copy link
Member

That is probably because karmada-controller-manager can't access member cluster, I don't know where you installed Karmada, but please check the endpoint of the member cluster, by following command:

kubectl get clusters k8s-cluster1 -o jsonpath='{.spec.apiEndpoint}'

Or, you can describe the clusters to see the conditions/events:

kubectl describe clusters member1

We usually use hack/create-cluster.sh to create a kind cluster for testing, we'll update the endpoint to deal with the network issues.

@SZT0728
Copy link
Author

SZT0728 commented Jan 11, 2022

What is the current-context of kubeconfig? cat /root/.kube/k8s-cluster1.config | grep current-context | sed 's/: /\n/g' | sed '1d'

the karmada-scheduler's log show that
[core] grpc: addrConn.createTransport failed to connect to {karmada-scheduler-estimator-kind-k8s-cluster1:10352 karmada-scheduler-estimator-kind-k8s-cluster1:10352 0 }. Err: connection error: desc = "transport: Error while dialing dial tcp: lookup karmada-scheduler-estimator-kind-k8s-cluster1 on 10.1.0.10:53: no such host". Reconnecting...
and i guess that the k8s-cluster1 is create by kind and run in docker,and the karmada running in k8s,maybe because they are not the same net spaces, so the karmada failed to connect k8s-cluster1,is it?

@prodanlabs
Copy link
Member

What is the current-context of kubeconfig? cat /root/.kube/k8s-cluster1.config | grep current-context | sed 's/: /\n/g' | sed '1d'

the karmada-scheduler's log show that [core] grpc: addrConn.createTransport failed to connect to {karmada-scheduler-estimator-kind-k8s-cluster1:10352 karmada-scheduler-estimator-kind-k8s-cluster1:10352 0 }. Err: connection error: desc = "transport: Error while dialing dial tcp: lookup karmada-scheduler-estimator-kind-k8s-cluster1 on 10.1.0.10:53: no such host". Reconnecting... and i guess that the k8s-cluster1 is create by kind and run in docker,and the karmada running in k8s,maybe because they are not the same net spaces, so the karmada failed to connect k8s-cluster1,is it?

karmada-scheduler-estimator is a non-essential component.You can look at the karmada-controller-manager log

 kubectl -n karmada-system logs -f karmada-controller-manager-b954bdf4c-q77zp

@orangedeng
Copy link

orangedeng commented Jan 12, 2022

I noticed that a new host cluster is created inside my current k8s cluster. I think we are looking forward to let the specific cluster to become the host cluster. Is there any way to do so?

@pigletfly
Copy link
Contributor

You can try installing with helm

@RainbowMango
Copy link
Member

/close
Hi @SZT0728 Thanks for reporting, If this issue still exist, please feel free to let us know.

@karmada-bot
Copy link
Collaborator

@RainbowMango: Closing this issue.

In response to this:

/close
Hi @SZT0728 Thanks for reporting, If this issue still exist, please feel free to let us know.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

6 participants