firefly

module
v0.0.0-...-0f541f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2022 License: Apache-2.0

README ยถ

Firefly

// todo: What's Firefly?

Features

  • Karmada Lifecycle Management

    Provide a centralized control plane to manage multiple Karmada instances, and will support integrate with more existing Kubernetes tool chain by default, like Clusterpedia in the future.

  • Self Inspection

    Provide a mechanism that allows viewing the status of Karmada own conponents and corresponding components of the host cluster only through Karmada's API.

Architecture

// TBD

Quick Start

This guide will cover:

  • Install Firefly's components in a Kubernetes cluster which is known as host cluster.
  • Create a Karmada instance and join a member cluster to it.
Install Firefly

Before you do it, please make sure that the cert-manager has been installed on the host cluster.

Step 1: Install CRDs

kubectl apply -f https://raw.githubusercontent.com/firefly-io/firefly/main/deploy/install.firefly.io_karmadas.yaml
kubectl apply -f https://raw.githubusercontent.com/firefly-io/firefly/main/deploy/install.firefly.io_clusterpedias.yaml

Step 2: Create namespace

kubectl create ns firefly-system

Step 3: Install components

kubectl apply -f https://raw.githubusercontent.com/firefly-io/firefly/main/deploy/install.yaml
Create a Karmada instance and join a member cluster to it

Step 1: Create a Karmada instance named demo

You can install Karmada on any namespace. The given command will deploy Karmada components on the firefly-system namespace.

kubectl apply -f https://raw.githubusercontent.com/firefly-io/firefly/main/example/karmada.yaml

Waiting for a few seconds, the output of kubectl -n firefly-system get pods,services,secrets:

NAME                                                   READY   STATUS    RESTARTS   AGE
pod/etcd-0                                             1/1     Running   0          21s
pod/firefly-karmada-manager-5678598d95-dcrf5           1/1     Running   0          8s
pod/karmada-aggregated-apiserver-65c77fbf4d-vdr9k      1/1     Running   0          11s
pod/karmada-apiserver-8495c66b47-kllwn                 1/1     Running   0          21s
pod/karmada-controller-manager-6fbd48544b-jdd7f        1/1     Running   0          8s
pod/karmada-kube-controller-manager-57f9fd76f6-z9whl   1/1     Running   0          8s
pod/karmada-scheduler-64b65b45d8-sxw8q                 1/1     Running   0          8s
pod/karmada-webhook-5488959847-n7lzk                   1/1     Running   0          8s
pod/firefly-controller-manager-7fd49597b6-4s4zz              1/1     Running   0          69s

NAME                                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
service/etcd                           ClusterIP   None             <none>        2379/TCP,2380/TCP   21s
service/karmada-aggregated-apiserver   ClusterIP   10.111.178.231   <none>        443/TCP             11s
service/karmada-apiserver              ClusterIP   10.111.66.86     <none>        5443/TCP            21s
service/karmada-webhook                ClusterIP   10.100.216.76    <none>        443/TCP             8s

NAME                                         TYPE                                  DATA   AGE
secret/default-token-4chv4                   kubernetes.io/service-account-token   3      74m
secret/etcd-cert                             Opaque                                4      21s
secret/firefly-karmada-manager-token-fpptr   kubernetes.io/service-account-token   3      42m
secret/karmada-cert                          Opaque                                16     21s
secret/karmada-webhook-cert                  Opaque                                2      21s
secret/kubeconfig                            Opaque                                1      21s
secret/firefly-controller-manager-token-w6xzh      kubernetes.io/service-account-token   3      69s

Step 2: Join an existing cluster to the Karmada using the karmadactl binary

Before doing it, we have to configure the hosts resolve if the host machine cannot directly access to the cluster domain of the karmada-apiserver service. Because this Karmada instance isn't exposed when we create it.

Note that 10.111.66.86 is the clusterIP of the karmada-apiserver service.

echo '10.111.66.86    karmada-apiserver.firefly-system.svc.cluster.local' >> /etc/hosts

Now, let's join an exising cluster k8s to the Karmada instance.

kubectl get  -n firefly-system secret karmada-kubeconfig -ojsonpath='{.data.kubeconfig}' | base64 -d > config
karmadactl join ik8s --kubeconfig config --cluster-kubeconfig <your_cluster_kubeconfig> --cluster-context  <your_cluster_context>

After a member cluster is added, the corresponding scheduler-estimator component will be automatically installed by the firefly-karamda-manager component.

(โŽˆ |ik8s01:firefly-system)โžœ  ~ kubectl -n firefly-system get po,svc,rolebinding
NAME                                                         READY   STATUS    RESTARTS   AGE
pod/etcd-0                                             1/1     Running   0          2m22s
pod/firefly-karmada-manager-5678598d95-dcrf5           1/1     Running   0          2m9s
pod/karmada-aggregated-apiserver-65c77fbf4d-vdr9k      1/1     Running   0          2m12s
pod/karmada-apiserver-8495c66b47-kllwn                 1/1     Running   0          2m22s
pod/karmada-controller-manager-6fbd48544b-jdd7f        1/1     Running   0          2m9s
pod/karmada-kube-controller-manager-57f9fd76f6-z9whl   1/1     Running   0          2m9s
pod/karmada-scheduler-64b65b45d8-sxw8q                 1/1     Running   0          2m9s
pod/karmada-webhook-5488959847-n7lzk                   1/1     Running   0          2m9s
pod/firefly-controller-manager-7fd49597b6-4s4zz              1/1     Running   0          3m10s
pod/karmada-scheduler-estimator-ik8s-69c8656785-r7lzq        1/1     Running   0          17s

NAME                                         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
service/etcd                           ClusterIP   None             <none>        2379/TCP,2380/TCP   2m23s
service/karmada-aggregated-apiserver   ClusterIP   10.111.178.231   <none>        443/TCP             2m13s
service/karmada-apiserver              ClusterIP   10.111.66.86     <none>        5443/TCP            2m23s
service/karmada-webhook                ClusterIP   10.100.216.76    <none>        443/TCP             2m10s
service/karmada-scheduler-estimator-ik8s     ClusterIP   10.103.181.159   <none>        10352/TCP           18s

NAME                                                                  ROLE                AGE
rolebinding.rbac.authorization.k8s.io/firefly-karmada-manager   ClusterRole/admin   2m10s

What's Next

See RoadMap for details.

More will be coming soon. Welcome to open an issue and propose a PR. ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

Contributors

Made with contrib.rocks.

License

Firefly is under the Apache 2.0 license. See the LICENSE file for details.

Directories ยถ

Path Synopsis
cmd
firefly-controller-manager
The controller manager is responsible for monitoring replication controllers, and creating corresponding pods to achieve the desired state.
The controller manager is responsible for monitoring replication controllers, and creating corresponding pods to achieve the desired state.
firefly-karmada-manager
The controller manager is responsible for monitoring replication controllers, and creating corresponding pods to achieve the desired state.
The controller manager is responsible for monitoring replication controllers, and creating corresponding pods to achieve the desired state.
pkg
apis/install/install
Package install installs the install API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the install API group, making it available as an option to all of the API encoding/decoding machinery.
apis/install/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/install/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/install/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
karmada/apis/toolkit/install
Package install installs the install API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the install API group, making it available as an option to all of the API encoding/decoding machinery.
karmada/apis/toolkit/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
karmada/generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
karmada/generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
karmada/generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
karmada/generated/clientset/versioned/typed/toolkit/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
karmada/generated/clientset/versioned/typed/toolkit/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL