{"id":23546961,"url":"https://github.com/open-cluster-management-io/multicloud-operators-subscription","last_synced_at":"2025-04-24T06:12:08.010Z","repository":{"id":37605654,"uuid":"379271166","full_name":"open-cluster-management-io/multicloud-operators-subscription","owner":"open-cluster-management-io","description":"Enables multicluster application delivery.","archived":false,"fork":false,"pushed_at":"2025-04-14T13:21:56.000Z","size":4839,"stargazers_count":45,"open_issues_count":14,"forks_count":40,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-24T06:11:43.747Z","etag":null,"topics":["gitops","kubernetes","multicloud","multicluster"],"latest_commit_sha":null,"homepage":"https://open-cluster-management.io/getting-started/integration/app-lifecycle/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-cluster-management-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG/CHANGELOG-v0.4.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-22T13:01:16.000Z","updated_at":"2025-04-14T13:22:00.000Z","dependencies_parsed_at":"2024-01-17T08:24:04.986Z","dependency_job_id":"5ffd45f4-5e48-483b-9463-cb60a140fd9a","html_url":"https://github.com/open-cluster-management-io/multicloud-operators-subscription","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-cluster-management-io%2Fmulticloud-operators-subscription","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-cluster-management-io%2Fmulticloud-operators-subscription/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-cluster-management-io%2Fmulticloud-operators-subscription/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-cluster-management-io%2Fmulticloud-operators-subscription/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-cluster-management-io","download_url":"https://codeload.github.com/open-cluster-management-io/multicloud-operators-subscription/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573354,"owners_count":21452352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitops","kubernetes","multicloud","multicluster"],"created_at":"2024-12-26T09:13:21.886Z","updated_at":"2025-04-24T06:12:07.992Z","avatar_url":"https://github.com/open-cluster-management-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multicloud-operators-subscription\n\n[![License](https://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n\n- [Overview](#overview)\n- [Architecture](#architecture)\n- [Stand-alone deployment](#stand-alone-deployment)\n- [Multi-cluster deployment](#multi-cluster-deployment)\n    - [Prerequisite](#prerequisite)\n    - [Operator Deployment](#operator-deployment)\n    - [Add-on Deployment](#add-on-deployment)\n    - [What is next](#what-is-next)\n- [GitOps subscription](#gitops-subscription)\n- [Object storage subscription](#object-storage-subscription)\n- [Community, discussion, contribution, and support](#community,-discussion,-contribution,-and-support)\n\n## Overview\n\nSubscriptions (subscription.apps.open-cluster-management.io) allow clusters to subscribe to a source repository [channel](https://github.com/open-cluster-management-io/multicloud-operators-channel) that can be the following types: Git repository, Helm release registry, or Object storage repository.\n\nSubscriptions can point to a channel for identifying new or updated resource templates. The subscription operator can then download directly from the storage location and deploy to targeted managed clusters without checking the hub cluster first. With a subscription, the subscription operator can monitor the channel for new or updated resources instead of the hub cluster.\n\n## Architecture\n\n![architecture](images/architecture.png)\n\n## Stand-alone deployment\n\nDeploy the subscription operator.\n\n```shell\n$ git clone https://github.com/open-cluster-management-io/multicloud-operators-subscription.git\n$ cd multicloud-operators-subscription\n$ make deploy-standalone\n$ kubectl -n open-cluster-management get deploy  multicluster-operators-subscription\nNAME                                READY   UP-TO-DATE   AVAILABLE   AGE\nmulticluster-operators-subscription   1/1     1            1           21m\n```\n\nCreate a Helm channel and subscribe to it.\n\n```shell\nkubectl apply -f ./examples/helmrepo-channel\n```\n\nFind the nginx pods that are deployed to the current namespace. You should have 3 backend pods with the controller.\n\n```shell\n$ kubectl get pods -l app.kubernetes.io/name=ingress-nginx\nNAME                                                   READY   STATUS    RESTARTS   AGE\ningress-nginx-simple-controller-84bbdd59f7-ccnwt       1/1     Running   0          4m36s\ningress-nginx-simple-defaultbackend-78669bfbbb-b6rwh   1/1     Running   0          4m36s\ningress-nginx-simple-defaultbackend-78669bfbbb-hb9g6   1/1     Running   0          4m36s\ningress-nginx-simple-defaultbackend-78669bfbbb-nmkng   1/1     Running   0          4m36s\n```\n\n## Multi-cluster deployment\n\n### Prerequisite\n\nInstall the `clusteradm` CLI tool. For more information see [here](https://open-cluster-management.io/getting-started/quick-start/#install-clusteradm-cli-tool).\n\nUsing `clusteradm`, deploy a cluster manager on your _hub_ cluster and deploy a klusterlet agent on your _managed_ cluster. For more information see [here](https://open-cluster-management.io/getting-started/quick-start/#deploy-a-cluster-manager-on-your-hub-cluster).\n\n### Operator Deployment\n\nDeploy the subscription operator on the _hub_ cluster.\n\n```shell\n$ kubectl config use-context \u003chub cluster context\u003e # kubectl config use-context kind-hub\n$ clusteradm install hub-addon --names application-manager\n$ kubectl -n open-cluster-management get deploy  multicluster-operators-subscription\nNAME                                READY   UP-TO-DATE   AVAILABLE   AGE\nmulticluster-operators-subscription   1/1     1            1           25s\n$ kubectl -n open-cluster-management wait deploy multicluster-operators-subscription --for condition=available\n```\n\n### Add-on Deployment\n\n\nEnable the subscription add-on for _managed_ cluster. For the value of `\u003cmanaged cluster name\u003e`, choose the managed cluster you want to install the add-on to by running the command `kubectl get managedclusters` on the _hub_ cluster.\n\n```shell\n$ kubectl config use-context \u003chub cluster context\u003e # kubectl config use-context kind-hub\n$ kubectl get managedclusters\nNAME                        HUB ACCEPTED   MANAGED CLUSTER URLS      JOINED   AVAILABLE   AGE\n\u003cmanaged cluster name\u003e      true           https://127.0.0.1:38745   True     True        21s\n$ clusteradm addon enable --names application-manager --clusters \u003cmanaged cluster name\u003e # clusteradm addon enable --names application-manager --clusters cluster1\n$ kubectl -n \u003cmanaged cluster name\u003e get managedclusteraddon # kubectl -n cluster1 get managedclusteraddon\nNAME                  AVAILABLE   DEGRADED   PROGRESSING\napplication-manager   True\n```\n\nCheck the the subscription add-on deployment on the _managed_ cluster.\n\n```shell\n$ kubectl config use-context \u003cmanaged cluster context\u003e # kubectl config use-context kind-cluster1\n$ kubectl -n open-cluster-management-agent-addon get deploy application-manager\nNAME                  READY   UP-TO-DATE   AVAILABLE   AGE\napplication-manager   1/1     1            1           103s\n```\n\n### What is next\n\nAfter a successful deployment, test the subscription operator with a `helm` subscription. Run the following command:\n\n```Shell\ngit clone https://github.com/open-cluster-management-io/multicloud-operators-subscription.git\ncd multicloud-operators-subscription\nkubectl config use-context \u003chub cluster context\u003e # kubectl config use-context kind-hub\nkubectl apply -f examples/helmrepo-hub-channel\n```\n\nAfter a while, you should see the subscription propagated to the managed cluster and the Helm app installed. By default, when a subscription deploys subscribed applications to target clusters, the applications are deployed to that subscription namespace. To confirm, run the following command:\n\n```Shell\n$ kubectl config use-context \u003cmanaged cluster context\u003e # kubectl config use-context kind-cluster1\n$ kubectl get subscriptions.apps\nNAME        STATUS       AGE    LOCAL PLACEMENT   TIME WINDOW\nnginx-sub   Subscribed   2m50s   true\n$ kubectl get pod\nNAME                                                   READY   STATUS    RESTARTS   AGE\ningress-nginx-simple-controller-84bbdd59f7-l7t9f       1/1     Running   0          3m34s\ningress-nginx-simple-defaultbackend-78669bfbbb-d498w   1/1     Running   0          3m34s\ningress-nginx-simple-defaultbackend-78669bfbbb-n47r2   1/1     Running   0          3m34s\ningress-nginx-simple-defaultbackend-78669bfbbb-r2xjn   1/1     Running   0          3m34s\n```\n\n## GitOps subscription\n\nYou can subscribe to public or enterprise Git repositories that contain Kubernetes resource YAML files or Helm charts, or both. See [Git repository channel subscription](docs/gitrepo_subscription.md) for more details.\n\n## Object storage subscription\n\nYou can subscribe to cloud object storage that contain Kubernetes resource YAML files. See [Object storage channel subscription](docs/objectstorage_subscription.md) for more details.\n\n## Community, discussion, contribution, and support\n\nCheck the [CONTRIBUTING Doc](CONTRIBUTING.md) for how to contribute to the repo.\n\n### Communication channels\n\nSlack channel: [#open-cluster-mgmt](http://slack.k8s.io/#open-cluster-mgmt)\n\n## License\n\nThis code is released under the Apache 2.0 license. See the file LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-cluster-management-io%2Fmulticloud-operators-subscription","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-cluster-management-io%2Fmulticloud-operators-subscription","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-cluster-management-io%2Fmulticloud-operators-subscription/lists"}