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

karmadactl init add karmada in docker #1228

Closed
wants to merge 49 commits into from

Conversation

prodanlabs
Copy link
Member

Signed-off-by: prodan [email protected]

What type of PR is this?
/kind feature
/kind cleanup

What this PR does / why we need it:
init add subcommand,install karmada on docker.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

root@dev-docker-077:~# ./kubectl-karmada init docker -h
install karmada in local docker.

Usage:
  karmada init docker [flags]

Examples:

# Install Karmada in local Docker.
# The karmada-apiserver binds the local ip by default.
kubectl karmada init docker 

# Specify the URL to download CRD tarball.
kubectl karmada init docker --crds https://github.com/karmada-io/karmada/releases/download/v0.10.1/crds.tar.gz

# Specify the local CRD tarball.
kubectl karmada init docker --crds /root/crds.tar.gz

# Private registry can be specified for all images.
kubectl karmada init docker --etcd-image local.registry.com/library/etcd:3.5.1-0

Flags:
      --cert-external-dns string                       the external DNS of Karmada certificate (e.g localhost,localhost.com)
      --cert-external-ip string                        the external IP of Karmada certificate (e.g 192.168.1.2,172.16.1.2)
      --crds string                                    Karmada crds resource. local file e.g. --crds /root/crds.tar.gz (default "https://github.com/karmada-io/karmada/releases/download/v0.10.1-274-g7323eadb-dirty/crds.tar.gz")
      --etcd-data string                               etcd data path,valid in hostPath mode. (default "/var/lib/karmada-etcd")
      --etcd-image string                              etcd image (default "k8s.gcr.io/etcd:3.5.1-0")
  -h, --help                                           help for docker
      --karmada-aggregated-apiserver-image string      karmada aggregated apiserver image (default "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:latest")
      --karmada-apiserver-image string                 Kubernetes apiserver image (default "k8s.gcr.io/kube-apiserver:v1.21.7")
      --karmada-controller-manager-image string        karmada controller manager  image (default "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:latest")
  -d, --karmada-data string                            karmada data path. kubeconfig cert and crds files (default "/etc/karmada")
      --karmada-kube-controller-manager-image string   Kubernetes controller manager image (default "k8s.gcr.io/kube-controller-manager:v1.21.7")
      --karmada-scheduler-image string                 karmada scheduler image (default "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:latest")
      --karmada-webhook-image string                   karmada webhook image (default "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:latest")
  -p, --port string                                    Karmada apiserver service host port (default "32443")

Global Flags:
      --add-dir-header                   If true, adds the file directory to the header of the log messages
      --alsologtostderr                  log to standard error as well as files
      --kubeconfig string                Paths to a kubeconfig. Only required if out-of-cluster.
      --log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log-dir string                   If non-empty, write log files in this directory
      --log-file string                  If non-empty, use this log file
      --log-file-max-size uint           Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
      --log-flush-frequency duration     Maximum number of seconds between log flushes (default 5s)
      --logtostderr                      log to standard error instead of files (default true)
      --one-output                       If true, only write logs to their native severity level (vs also writing to each lower severity level)
      --skip-headers                     If true, avoid header prefixes in the log messages
      --skip-log-headers                 If true, avoid headers when opening log files
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

init command

./kubectl-karmada init docker --crds https://github.com/karmada-io/karmada/releases/download/v1.0.0/crds.tar.gz \
--karmada-aggregated-apiserver-image swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:v1.0.0 \
--karmada-controller-manager-image swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:v1.0.0  \
--karmada-scheduler-image swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:v1.0.0  \
--karmada-webhook-image swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:v1.0.0

init logs

I0108 23:31:43.610843   23695 deploy.go:58] karmada apiserver ip: 172.31.6.150
I0108 23:31:43.664120   23695 image.go:60] Download image:  k8s.gcr.io/etcd:3.5.1-0
Pulling: [==================================================>]  8.426MB/8.426MB
Status: Downloaded newer image for k8s.gcr.io/etcd:3.5.1-0
I0108 23:31:54.450001   23695 image.go:60] Download image:  k8s.gcr.io/kube-apiserver:v1.21.7
Pulling: [==================================================>]  29.08MB/29.08MB
Status: Downloaded newer image for k8s.gcr.io/kube-apiserver:v1.21.7
I0108 23:32:00.075897   23695 image.go:60] Download image:  swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:v1.0.0
Pulling: [==================================================>]  24.28MB/24.28MB
Status: Downloaded newer image for swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:v1.0.0
I0108 23:32:02.124959   23695 image.go:60] Download image:  k8s.gcr.io/kube-controller-manager:v1.21.7
Pulling: [==================================================>]  28.06MB/28.06MB
Status: Downloaded newer image for k8s.gcr.io/kube-controller-manager:v1.21.7
I0108 23:32:05.491891   23695 image.go:60] Download image:  swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:v1.0.0
Pulling: [==================================================>]  27.58MB/27.58MB
Status: Downloaded newer image for swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:v1.0.0
I0108 23:32:07.766401   23695 image.go:60] Download image:  swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:v1.0.0
Pulling: [==================================================>]  23.12MB/23.12MB
Status: Downloaded newer image for swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:v1.0.0
I0108 23:32:09.796884   23695 image.go:60] Download image:  swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:v1.0.0
Pulling: [==================================================>]  27.94MB/27.94MB
Status: Downloaded newer image for swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:v1.0.0
I0108 23:32:14.939226   23695 cert.go:230] Generate ca certificate success.
I0108 23:32:15.332411   23695 cert.go:230] Generate etcd-server certificate success.
I0108 23:32:15.560657   23695 cert.go:230] Generate etcd-client certificate success.
I0108 23:32:15.750858   23695 cert.go:230] Generate karmada certificate success.
I0108 23:32:15.998818   23695 cert.go:230] Generate front-proxy-ca certificate success.
I0108 23:32:16.110519   23695 cert.go:230] Generate front-proxy-client certificate success.
I0108 23:32:16.110546   23695 util.go:147] download crds file name: /etc/karmada/crds.tar.gz
Downloading...[ 57.32% ]
Downloading...[ 100.00% ]
Download complete.
Downloading...[ 100.00% ]
Download complete.
I0108 23:32:17.820810   23695 deploy.go:147] Create karmada kubeconfig success.
W0108 23:32:18.838304   23695 check.go:14] wait container start...
I0108 23:32:29.841272   23695 check.go:30] Container: karmada-etcd is ready. Status: running. ContainerIP: 166.233.0.2
W0108 23:32:30.260818   23695 check.go:14] wait container start...
I0108 23:32:46.263437   23695 check.go:30] Container: karmada-apiserver is ready. Status: running. ContainerIP: 166.233.0.3
I0108 23:32:46.285037   23695 deploy.go:59] Initialize karmada bases crd resource `/etc/karmada/crds/bases`
I0108 23:32:46.583321   23695 deploy.go:70] Initialize karmada patches crd resource `/etc/karmada/crds/patches`
I0108 23:32:46.708848   23695 deploy.go:82] Crate MutatingWebhookConfiguration mutating-config.
I0108 23:32:46.717230   23695 deploy.go:86] Crate ValidatingWebhookConfiguration validating-config.
I0108 23:32:46.757534   23695 deploy.go:230] Create APIService 'v1alpha1.cluster.karmada.io'
W0108 23:32:47.157313   23695 check.go:14] wait container start...
I0108 23:32:58.160992   23695 check.go:30] Container: karmada-aggregated-apiserver is ready. Status: running. ContainerIP: 166.233.0.167

------------------------------------------------------------------------------------------------------
 █████   ████   █████████   ███████████   ██████   ██████   █████████   ██████████     █████████
░░███   ███░   ███░░░░░███ ░░███░░░░░███ ░░██████ ██████   ███░░░░░███ ░░███░░░░███   ███░░░░░███
 ░███  ███    ░███    ░███  ░███    ░███  ░███░█████░███  ░███    ░███  ░███   ░░███ ░███    ░███
 ░███████     ░███████████  ░██████████   ░███░░███ ░███  ░███████████  ░███    ░███ ░███████████
 ░███░░███    ░███░░░░░███  ░███░░░░░███  ░███ ░░░  ░███  ░███░░░░░███  ░███    ░███ ░███░░░░░███
 ░███ ░░███   ░███    ░███  ░███    ░███  ░███      ░███  ░███    ░███  ░███    ███  ░███    ░███
 █████ ░░████ █████   █████ █████   █████ █████     █████ █████   █████ ██████████   █████   █████
░░░░░   ░░░░ ░░░░░   ░░░░░ ░░░░░   ░░░░░ ░░░░░     ░░░░░ ░░░░░   ░░░░░ ░░░░░░░░░░   ░░░░░   ░░░░░
------------------------------------------------------------------------------------------------------
Karmada is installed successfully.

Register Kubernetes cluster to Karmada control plane.

Register cluster with 'Push' mode
                                                                                                                                                                             
Step 1: Use kubectl karmada join to register the cluster to Karmada control panel. --cluster-kubeconfig is members kubeconfig.
(In karmada)~# MEMBER_CLUSTER_NAME=`cat ~/.kube/config  | grep current-context | sed 's/: /\n/g'| sed '1d'`
(In karmada)~# kubectl karmada --kubeconfig /etc/karmada/karmada-apiserver.config  join ${MEMBER_CLUSTER_NAME} --cluster-kubeconfig=$HOME/.kube/config

Step 2: Show members of karmada
(In karmada)~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config get clusters


Register cluster with 'Pull' mode

Step 1:  Send karmada kubeconfig and karmada-agent.yaml to member kubernetes
(In karmada)~# scp /etc/karmada/karmada-apiserver.config /etc/karmada/karmada-agent.yaml {member kubernetes}:~
                                                                                                                                                                             
Step 2:  Create karmada kubeconfig secret
 Notice:
   Cross-network, need to change the config server address.
(In member kubernetes)~#  kubectl create ns karmada-system
(In member kubernetes)~#  kubectl create secret generic karmada-kubeconfig --from-file=karmada-kubeconfig=/root/karmada-apiserver.config  -n karmada-system                  

Step 3: Create karmada agent
(In member kubernetes)~#  MEMBER_CLUSTER_NAME="demo"
(In member kubernetes)~#  sed -i "s/{member_cluster_name}/${MEMBER_CLUSTER_NAME}/g" karmada-agent.yaml
(In member kubernetes)~#  kubectl create -f karmada-agent.yaml
                                                                                                                                                                             
Step 4: Show members of karmada                                                                                                                                              
(In karmada)~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config get clusters

test

root@dev-docker-077:~# MEMBER_CLUSTER_NAME=`cat ~/.kube/config  | grep current-context | sed 's/: /\n/g'| sed '1d'`
root@dev-docker-077:~# ./kubectl-karmada --kubeconfig /etc/karmada/karmada-apiserver.config  join ${MEMBER_CLUSTER_NAME} --cluster-kubeconfig=$HOME/.kube/config
cluster(member1) is joined successfully
root@dev-docker-077:~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config get clusters
NAME      VERSION   MODE   READY   AGE
member1   v1.22.3   Push   True    5s
root@dev-docker-077:~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config apply -f karmada-nginx-example-member1.yaml 
deployment.apps/nginx created
service/nginx created
propagationpolicy.policy.karmada.io/nginx-propagation created
propagationpolicy.policy.karmada.io/nginx-propagation-svc created
root@dev-docker-077:~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config get deploy
NAME    READY   UP-TO-DATE   AVAILABLE   AGE
nginx   2/2     2            2           13s

aa

root@dev-docker-077:~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config get clusters
NAME      VERSION   MODE   READY   AGE
member1   v1.22.3   Push   True    13m
root@dev-docker-077:~# kubectl  --kubeconfig /etc/karmada/karmada-apiserver.config  get --raw /apis/cluster.karmada.io/v1alpha1/clusters/member1/proxy/api/v1/nodes|jq .
{
  "kind": "NodeList",
  "apiVersion": "v1",
  "metadata": {
    "resourceVersion": "7130666"
  },
  "items": [
    {
      "metadata": {
        "name": "dev-k8s-master01",
        "uid": "10134124-e1a3-44ce-b81a-3bc8f0709756",
        "resourceVersion": "7130616",
        "creationTimestamp": "2021-11-02T03:47:27Z",
        "labels": {
          "beta.kubernetes.io/arch": "amd64",
          "beta.kubernetes.io/os": "linux",
          "kubernetes.io/arch": "amd64",
          "kubernetes.io/hostname": "dev-k8s-master01",
          "kubernetes.io/os": "linux"
        },
        "annotations": {
          "node.alpha.kubernetes.io/ttl": "0",
          "projectcalico.org/IPv4Address": "172.31.6.145/20",
          "projectcalico.org/IPv4IPIPTunnelAddr": "192.168.159.0",
          "volumes.kubernetes.io/controller-managed-attach-detach": "true"
        },
        "managedFields": [
          {
            "manager": "kubelet",
            "operation": "Update",
            "apiVersion": "v1",
            "time": "2021-11-02T03:47:27Z",
            "fieldsType": "FieldsV1",
            "fieldsV1": {
              "f:metadata": {
                "f:annotations": {
                  ".": {},
                  "f:volumes.kubernetes.io/controller-managed-attach-detach": {}
                },
                "f:labels": {
                  ".": {},
                  "f:beta.kubernetes.io/arch": {},
                  "f:beta.kubernetes.io/os": {},
                  "f:kubernetes.io/arch": {},
                  "f:kubernetes.io/hostname": {},
                  "f:kubernetes.io/os": {}
                }
              }
            }
          },
          {
            "manager": "calico-node",
            "operation": "Update",
            "apiVersion": "v1",
            "time": "2021-11-02T03:50:59Z",
            "fieldsType": "FieldsV1",
            "fieldsV1": {
              "f:metadata": {
                "f:annotations": {
                  "f:projectcalico.org/IPv4Address": {},
                  "f:projectcalico.org/IPv4IPIPTunnelAddr": {}
                }
              },
              "f:status": {
                "f:conditions": {
                  "k:{\"type\":\"NetworkUnavailable\"}": {
                    ".": {},
                    "f:lastHeartbeatTime": {},
                    "f:lastTransitionTime": {},
                    "f:message": {},
                    "f:reason": {},
                    "f:status": {},
                    "f:type": {}
                  }
                }
              }
            },
            "subresource": "status"
          },
          {
            "manager": "kube-controller-manager",
            "operation": "Update",
            "apiVersion": "v1",
            "time": "2021-12-23T04:57:01Z",
            "fieldsType": "FieldsV1",
            "fieldsV1": {
              "f:metadata": {
                "f:annotations": {
                  "f:node.alpha.kubernetes.io/ttl": {}
                }
              }
            }
          },
          {
            "manager": "kubelet",
            "operation": "Update",
            "apiVersion": "v1",
            "time": "2021-12-23T07:13:04Z",
            "fieldsType": "FieldsV1",
            "fieldsV1": {
              "f:status": {
                "f:conditions": {
                  "k:{\"type\":\"DiskPressure\"}": {
                    "f:lastHeartbeatTime": {}
                  },
                  "k:{\"type\":\"MemoryPressure\"}": {
                    "f:lastHeartbeatTime": {}
                  },
                  "k:{\"type\":\"PIDPressure\"}": {
                    "f:lastHeartbeatTime": {}
                  },
                  "k:{\"type\":\"Ready\"}": {
                    "f:lastHeartbeatTime": {},
                    "f:lastTransitionTime": {},
                    "f:message": {},
                    "f:reason": {},
                    "f:status": {}
                  }
                },
                "f:images": {}
              }
            },
            "subresource": "status"
          }
        ]
      },
      "spec": {},
      "status": {
        "capacity": {
          "cpu": "2",
          "ephemeral-storage": "20509308Ki",
          "hugepages-1Gi": "0",
          "hugepages-2Mi": "0",
          "memory": "8153188Ki",
          "pods": "220"
        },
        "allocatable": {
          "cpu": "2",
          "ephemeral-storage": "20509308Ki",
          "hugepages-1Gi": "0",
          "hugepages-2Mi": "0",
          "memory": "7924400947200m",
          "pods": "220"
        },
        "conditions": [
          {
            "type": "NetworkUnavailable",
            "status": "False",
            "lastHeartbeatTime": "2021-11-02T03:50:59Z",
            "lastTransitionTime": "2021-11-02T03:50:59Z",
            "reason": "CalicoIsUp",
            "message": "Calico is running on this node"
          },
          {
            "type": "MemoryPressure",
            "status": "False",
            "lastHeartbeatTime": "2022-01-08T15:46:38Z",
            "lastTransitionTime": "2021-11-02T03:47:27Z",
            "reason": "KubeletHasSufficientMemory",
            "message": "kubelet has sufficient memory available"
          },
          {
            "type": "DiskPressure",
            "status": "False",
            "lastHeartbeatTime": "2022-01-08T15:46:38Z",
            "lastTransitionTime": "2021-11-02T03:47:27Z",
            "reason": "KubeletHasNoDiskPressure",
            "message": "kubelet has no disk pressure"
          },
          {
            "type": "PIDPressure",
            "status": "False",
            "lastHeartbeatTime": "2022-01-08T15:46:38Z",
            "lastTransitionTime": "2021-11-02T03:47:27Z",
            "reason": "KubeletHasSufficientPID",
            "message": "kubelet has sufficient PID available"
          },
          {
            "type": "Ready",
            "status": "True",
            "lastHeartbeatTime": "2022-01-08T15:46:38Z",
            "lastTransitionTime": "2021-11-02T03:50:37Z",
            "reason": "KubeletReady",
            "message": "kubelet is posting ready status. AppArmor enabled"
          }
        ],
        "addresses": [
          {
            "type": "InternalIP",
            "address": "172.31.6.145"
          },
          {
            "type": "Hostname",
            "address": "dev-k8s-master01"
          }
        ],
        "daemonEndpoints": {
          "kubeletEndpoint": {
            "Port": 10250
          }
        },
        "nodeInfo": {
          "machineID": "20210922095802902033212080128428",
          "systemUUID": "07029b5b-b03b-47d6-9d89-4773054d0f80",
          "bootID": "75d7fe2d-af24-44e1-88ff-8a9d142ebdf3",
          "kernelVersion": "5.4.0-86-generic",
          "osImage": "Ubuntu 20.04.3 LTS",
          "containerRuntimeVersion": "containerd://1.5.2",
          "kubeletVersion": "v1.22.3",
          "kubeProxyVersion": "v1.22.3",
          "operatingSystem": "linux",
          "architecture": "amd64"
        },
        "images": [
          {
            "names": [
              "k8s.gcr.io/etcd@sha256:64b9ea357325d5db9f8a723dcf503b5a449177b17ac87d69481e126bb724c263",
              "k8s.gcr.io/etcd:3.5.1-0"
            ],
            "sizeBytes": 98888614
          },
          {
            "names": [
              "k8s.gcr.io/kube-apiserver@sha256:de881fa0e51e86be2ac97991b3b30fabf3f7310e97c112202b0734263e3f6636",
              "k8s.gcr.io/kube-apiserver:v1.21.7"
            ],
            "sizeBytes": 30458540
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver@sha256:e8f70396516adc3917f92a8b3a79473fb9a5ecacb4fdfcf7f19947a7ff6c5707"
            ],
            "sizeBytes": 30378204
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver@sha256:36f52d56e2743879bc95266fa6a7427a009c4936057a8fee7d6d2673be1258f7",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:latest"
            ],
            "sizeBytes": 30369776
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver@sha256:5f8324e4ea9b10faac72ef3943af033fada00f96062cc58f9ce44a1f04cea942"
            ],
            "sizeBytes": 30354961
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver@sha256:ecdf48cb15cc3a479659d0f2cb300fde2f73af9ae3ad83fb0c10ed8b30d5ca6e",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:v1.0.0"
            ],
            "sizeBytes": 30347328
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager@sha256:406abc33b1c2646144ccb253c0bd0b0c7cc9f4484c400245ca7dc3298ab21dfd",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:latest"
            ],
            "sizeBytes": 30005025
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager@sha256:4f399ac7d2bc13d1d62ea216dd9f6975d823867d4d9374b0f86ff9c9731c73cb"
            ],
            "sizeBytes": 30002117
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager@sha256:7faaf16e24bf98142aec3189f92f7374741d4cc587056d69fc9d14efb90901ef",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:v1.0.0"
            ],
            "sizeBytes": 29990842
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager@sha256:6632ed734184e3b0eb0b9906ad6166b9b3f56a4720a2cb8a7765c574699d1e1a"
            ],
            "sizeBytes": 29981711
          },
          {
            "names": [
              "k8s.gcr.io/kube-controller-manager@sha256:d05d7e5c66628a5c2311836387f50756debf0c416ee99e24f111539b55988d1a",
              "k8s.gcr.io/kube-controller-manager:v1.21.7"
            ],
            "sizeBytes": 29446242
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler-estimator@sha256:577a5b371f049d3ba41fb83590d45ec1b3df2268945989b5249cfb773d18a32b",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler-estimator:latest"
            ],
            "sizeBytes": 26734749
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler@sha256:a640ee7168ad416f0e398e90ef5f2813e9963d257ed7b9b25dc3271207b778ed"
            ],
            "sizeBytes": 26710840
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler@sha256:ea95659cb19d16fae4cda4e1b5c1e215eee5442c17c34c72a62bb68f056a7b40"
            ],
            "sizeBytes": 26710046
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler@sha256:b81e07492283e9e7d07c2260824875ac11e02d451e35cca36834a5ddbf419429",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:latest"
            ],
            "sizeBytes": 26709950
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler@sha256:31c8884c2935033237e81aa0fb8272ab5f25af0aafe23d3b79d60b99adfc18ea",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:v1.0.0"
            ],
            "sizeBytes": 26691762
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook@sha256:068cb2947a29cf5c48f26a94fca6e3a0d4e863cd0824bcd88cd149a90d98f26c",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:latest"
            ],
            "sizeBytes": 25546056
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook@sha256:998a6e390c3b24483df30f9c7bc8f06a56d7206e2e862261a6b23f1114da7e99"
            ],
            "sizeBytes": 25545092
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook@sha256:96f78f773c40b32c299553f22cbb45535d1dc378dac8bc9e2700d7d73080004e"
            ],
            "sizeBytes": 25543866
          },
          {
            "names": [
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook@sha256:15af0007d82841624385115cc2004516b3d50b9bf4cf2b993c717e334a2d80eb",
              "swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:v1.0.0"
            ],
            "sizeBytes": 25532156
          },
          {
            "names": [
              "docker.io/library/nginx@sha256:bfe377bdeb9ff37a62b49e149ac12c67a18089699bb844ce917fe3dbb834abed",
              "docker.io/library/nginx:1.21.1-alpine"
            ],
            "sizeBytes": 9935133
          },
          {
            "names": [
              "docker.io/library/alpine@sha256:635f0aa53d99017b38d1a0aa5b2082f7812b03e3cdb299103fe77b5c8a07f1d2",
              "docker.io/library/alpine:3.14.3"
            ],
            "sizeBytes": 2826618
          },
          {
            "names": [
              "k8s.gcr.io/pause@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07",
              "k8s.gcr.io/pause:3.5"
            ],
            "sizeBytes": 301416
          }
        ]
      }
    }
  ]
}

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jan 8, 2022
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign rainbowmango after the PR has been reviewed.
You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 8, 2022
@prodanlabs
Copy link
Member Author

prodanlabs commented Jan 8, 2022

root@dev-docker-077:~# docker network ls 
NETWORK ID     NAME      DRIVER    SCOPE
afe1960d4459   bridge    bridge    local
cb5b4b9d1be9   host      host      local
319f7ff5d4df   karmada   bridge    local
99addc087264   none      null      local
root@dev-docker-077:~# docker ps -a
CONTAINER ID   IMAGE                                                                              COMMAND                  CREATED          STATUS          PORTS                               NAMES
7a6c58f57b76   swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-webhook:v1.0.0                "/bin/karmada-webhoo…"   29 minutes ago   Up 29 minutes                                       karmada-webhook
52aac487a55a   swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-controller-manager:v1.0.0     "/bin/karmada-contro…"   29 minutes ago   Up 29 minutes                                       karmada-controller-manager
205bfb0cd756   swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:v1.0.0              "/bin/karmada-schedu…"   29 minutes ago   Up 29 minutes                                       karmada-scheduler
8b3cf36c38ee   k8s.gcr.io/kube-controller-manager:v1.21.7                                         "/go-runner kube-con…"   29 minutes ago   Up 29 minutes                                       kube-controller-manager
ac3b72174ef1   swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:v1.0.0   "/bin/karmada-aggreg…"   29 minutes ago   Up 29 minutes                                       karmada-aggregated-apiserver
85dae7586f17   k8s.gcr.io/kube-apiserver:v1.21.7                                                  "/go-runner kube-api…"   30 minutes ago   Up 30 minutes   0.0.0.0:32443->5443/tcp             karmada-apiserver
c444d6979cec   k8s.gcr.io/etcd:3.5.1-0                                                            "/usr/local/bin/etcd…"   30 minutes ago   Up 30 minutes   2379-2380/tcp, 4001/tcp, 7001/tcp   karmada-etcd

@RainbowMango
Copy link
Member

cc me when this is ready for review.

@GitHubxsy
Copy link
Contributor

Awesome, Kind (Karmada in docker) is born.

@prodanlabs
Copy link
Member Author

cc @RainbowMango

Originally I wanted to give up creating docker network , just use docker --linkto communicate between containers by container name. but karmada apiserver and karmada aggregated apiserver need to be linked to each other, docker cannot link to a non running container, whichever container starts first will fail.
So, let's keep the original plan first. :)

@prodanlabs
Copy link
Member Author

hi @RainbowMango
Do you have any additions or suggestions for this PR?

@RainbowMango
Copy link
Member

Haven't looked into it yet. Can we discuss it at the next community meeting? Feel free to add an agenda for it.

@prodanlabs
Copy link
Member Author

Haven't looked into it yet. Can we discuss it at the next community meeting? Feel free to add an agenda for it.

ok, if my side goes well, can also show the new karmadactl command get.

@RainbowMango
Copy link
Member

can also show the new karmadactl command get.

Is it the same thing we are talking about at #1219? @lonelyCZ is working on it.

@prodanlabs
Copy link
Member Author

can also show the new karmadactl command get.

Is it the same thing we are talking about at #1219? @lonelyCZ is working on it.

I want to solve the problem of getting resource information such as pods through get in pull mode.Unfortunately, I have tried some methods, but the results are not very good.

@lonelyCZ
Copy link
Member

I want to solve the problem of getting resource information such as pods through get in pull mode.Unfortunately, I have tried some methods, but the results are not very good.

Do you try ANP in aggregated-api-endpoint.md?

@karmada-bot karmada-bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jan 22, 2022
ashley-rongfang and others added 22 commits January 22, 2022 21:13
Signed-off-by: ashley-rongfang <[email protected]>
Signed-off-by: pigletfly <[email protected]>
Signed-off-by: Garrybest <[email protected]>
Signed-off-by: Xinzhao Xu <[email protected]>
Signed-off-by: Xinzhao Xu <[email protected]>
Signed-off-by: prodan <[email protected]>
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jan 22, 2022
@prodanlabs
Copy link
Member Author

close resubmit

@prodanlabs prodanlabs closed this Jan 22, 2022
@prodanlabs prodanlabs deleted the karmadactl-init branch January 22, 2022 13:22
@prodanlabs prodanlabs restored the karmadactl-init branch January 22, 2022 13:22
@prodanlabs prodanlabs deleted the karmadactl-init branch January 22, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.