kubewharf / kubeadmiral

Multi-Cluster Kubernetes Orchestration
Apache License 2.0
658 stars 89 forks source link

[Error] in installation: make local-up #286

Closed Larry-shuo closed 7 months ago

Larry-shuo commented 7 months ago

Description

Run make local-up

What happended:

Fails with

[+] Building 925.5s (9/13)                                                                                                           docker:default
 => [internal] load build definition from Dockerfile                                                                                           0.0s
 => => transferring dockerfile: 798B                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:buster                                                                              95.4s
 => [internal] load metadata for docker.io/library/golang:1.19                                                                               127.1s
 => [internal] load build context                                                                                                              0.1s
 => => transferring context: 40.03kB                                                                                                           0.0s
 => ERROR [builder 1/4] FROM docker.io/library/golang:1.19@sha256:3025bf670b8363ec9f1b4c4f27348e6d9b7fec607c47e401e40df816853e743a           798.4s
 => => resolve docker.io/library/golang:1.19@sha256:3025bf670b8363ec9f1b4c4f27348e6d9b7fec607c47e401e40df816853e743a                           0.0s
 => => sha256:1611d4f97c5ab666d3c123d72b3bb646dd12bbf7577dd1388fdb191d54cdf440 1.58kB / 1.58kB                                                 0.0s
 => => sha256:80b76a6c918cba6d8e68fb2b80a7afdd7ce3af457d87e413d985434ae7897533 6.87kB / 6.87kB                                                 0.0s
 => => sha256:012c0b3e998c1a0c0bedcf712eaaafb188580529dd026a04aa1ce13fdb39e42b 49.56MB / 49.56MB                                              37.1s
 => => sha256:3025bf670b8363ec9f1b4c4f27348e6d9b7fec607c47e401e40df816853e743a 2.36kB / 2.36kB                                                 0.0s
 => => sha256:00046d1e755ea94fa55a700ca9a10597e4fac7c47be19d970a359b0267a51fbf 24.03MB / 24.03MB                                              34.5s
 => => sha256:9f13f5a53d118643c1f1ff294867c09f224d00edca21f56caa71c2321f8ca004 0B / 64.11MB                                                  798.3s
 => => sha256:190fa1651026077cee00b53a754acbe0dc734b99255c6b274e798f6cd877ae18 92.27MB / 92.27MB                                             175.2s
 => => extracting sha256:012c0b3e998c1a0c0bedcf712eaaafb188580529dd026a04aa1ce13fdb39e42b                                                      0.5s
 => => sha256:0808c64687902329ac64331848304f6f0bc14b86d6be46bccf79292b564f6587 149.14MB / 149.14MB                                           252.0s
 => => extracting sha256:00046d1e755ea94fa55a700ca9a10597e4fac7c47be19d970a359b0267a51fbf                                                      0.2s
 => => sha256:5ec11cb68eac452710eadb46df5e6cf6ead699755303758bf1e262e47b013417 155B / 155B                                                   205.6s
 => CACHED [stage-1 1/4] FROM docker.io/library/debian:buster@sha256:46ca02d33c65ab188d6e56f26c323bf1aa9a99074f2f54176fdc3884304f58b8          0.0s
 => [stage-1 2/4] RUN if [ "cn" = "cn" ]; then sed -i 's#http://deb.debian.org#http://mirrors.tuna.tsinghua.edu.cn#g' /etc/apt/sources.list;   0.3s
 => [stage-1 3/4] RUN apt-get update -y && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*                                   5.0s
------
 > [builder 1/4] FROM docker.io/library/golang:1.19@sha256:3025bf670b8363ec9f1b4c4f27348e6d9b7fec607c47e401e40df816853e743a:
------
WARNING: buildx: failed to read current commit information with git rev-parse --is-inside-work-tree
Dockerfile:2
--------------------
   1 |     # multi-arch image building for kubeadmiral-controller-manager
   2 | >>> FROM --platform=${BUILDPLATFORM} golang:1.19 as builder
   3 |     ARG TARGETPLATFORM GOPROXY BUILD_FLAGS
   4 |     ADD . /build
--------------------
ERROR: failed to solve: failed to read expected number of bytes: unexpected EOF
make[1]: *** [Makefile:113: images] Error 1
make[1]: Leaving directory '/home/larry/code/kubeadmiral'
make: *** [Makefile:83: local-up] Error 2
root:kubeadmiral/ # client_loop: send disconnect: Connection reset                                                                       [13:33:25]

Then

And when I replace golang:1.20 with golang:1.19 in https://github.com/kubewharf/kubeadmiral/blob/main/hack/dockerfiles/Dockerfile#L2 It works and successfully deploy KubeAdmiral. What happend?

JackZxj commented 7 months ago

This seems to be a network issue. Can you try again? BTW I think go 20 will be fine too.

image

Larry-shuo commented 7 months ago

I've tried many times and used proxy, but this image always can't be completed.

Larry-shuo commented 7 months ago

Now I continue the quickstart, it can't find the resource type: fdeploystatus :

root:kubeadmiral/ # kubectl get fdeploystatus echo-server -oyaml
error: the server doesn't have a resource type "fdeploystatus"

It actually not exists:

root:kubeadmiral/ # kubectl api-resources |grep kubeadmiral                                 
clustercollectedstatuses               ccs          core.kubeadmiral.io/v1alpha1           false        ClusterCollectedStatus
clusterfederatedobjects                cfo          core.kubeadmiral.io/v1alpha1           false        ClusterFederatedObject
clusteroverridepolicies                cop          core.kubeadmiral.io/v1alpha1           false        ClusterOverridePolicy
clusterpropagatedversions                           core.kubeadmiral.io/v1alpha1           false        ClusterPropagatedVersion
clusterpropagationpolicies             cpp          core.kubeadmiral.io/v1alpha1           false        ClusterPropagationPolicy
collectedstatuses                      cs           core.kubeadmiral.io/v1alpha1           true         CollectedStatus
federatedclusters                      fcluster     core.kubeadmiral.io/v1alpha1           false        FederatedCluster
federatedobjects                       fo           core.kubeadmiral.io/v1alpha1           true         FederatedObject
federatedtypeconfigs                   ftc          core.kubeadmiral.io/v1alpha1           false        FederatedTypeConfig
overridepolicies                       op           core.kubeadmiral.io/v1alpha1           true         OverridePolicy
propagatedversions                                  core.kubeadmiral.io/v1alpha1           true         PropagatedVersion
propagationpolicies                    pp           core.kubeadmiral.io/v1alpha1           true         PropagationPolicy
schedulerpluginwebhookconfigurations                core.kubeadmiral.io/v1alpha1           false        SchedulerPluginWebhookConfiguration
schedulingprofiles                     sp           core.kubeadmiral.io/v1alpha1           false        SchedulingProfile

and the 'fedtypesv1a1' can be unresolved in files of https://github.com/kubewharf/kubeadmiral/blob/main/test/e2e/resourcepropagation/

ftypesv1a1 not find

JackZxj commented 7 months ago

sorry that our quick start is out of date now, we will update it later.

now you can get federatedobject and collectedstatus to see some federated info. federatedobject records some distribution information, collectedstatus records some status info which were collected from dispatched member clusters. And label selector is useful to find the owner native k8s resources

gary-lgy commented 7 months ago

Hi @Larry-shuo, @JackZxj has updated the quickstart guide. Do have another try and let us know if you need further help :)

Larry-shuo commented 7 months ago

That's no problem. THX!