{"id":20982993,"url":"https://github.com/tkestack/knitnet-operator","last_synced_at":"2025-08-11T18:24:55.102Z","repository":{"id":48591321,"uuid":"381177474","full_name":"tkestack/knitnet-operator","owner":"tkestack","description":"Operator for support direct networking between Pods and Services in different Kubernetes clusters","archived":false,"fork":false,"pushed_at":"2021-08-09T02:48:04.000Z","size":5504,"stargazers_count":7,"open_issues_count":8,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-14T16:42:01.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/tkestack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-28T22:37:57.000Z","updated_at":"2022-06-14T08:20:56.000Z","dependencies_parsed_at":"2022-08-27T11:31:55.250Z","dependency_job_id":null,"html_url":"https://github.com/tkestack/knitnet-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tkestack/knitnet-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fknitnet-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fknitnet-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fknitnet-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fknitnet-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkestack","download_url":"https://codeload.github.com/tkestack/knitnet-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fknitnet-operator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269933305,"owners_count":24499261,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-19T05:47:22.381Z","updated_at":"2025-08-11T18:24:55.031Z","avatar_url":"https://github.com/tkestack.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tkestack/knitnet-operator\"\u003e\n    \u003cimg src=\"https://github.com/tkestack/knitnet-operator/workflows/CI%20Pipeline/badge.svg\" alt=\"Github CI\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/tkestack/knitnet-operator\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/tkestack/knitnet-operator\" alt=\"GoReportCard\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://quay.io/repository/danielxlee/knitnet-operator\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/container-ready-green\" alt=\"Docker\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/tkestack/knitnet-operator/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Knitnet Operator](#knitnet-operator)\n  - [Architecture](#architecture)\n    - [Purpose](#purpose)\n    - [Supported Features](#supported-features)\n  - [Getting Started](#getting-started)\n    - [Demo](#demo)\n    - [Example](#example)\n    - [Prerequisites](#prerequisites)\n    - [Quickstart](#quickstart)\n    - [Verify](#verify)\n    - [Quickstart with Ansible](#quickstart-with-ansible)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# Knitnet Operator\n\nA Golang based knitnet operator that will make/oversee Submariner components on top of the Kubernetes.\n\n## Architecture\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./docs/icons/submariner-arch.png\"\u003e\n\u003c/div\u003e\n\n### Purpose\n\nThe purpose of creating this operator was to provide an easy and production-grade setup of Submariner components on Kubernetes. It doesn't care if you have a plain on-prem Kubernetes or cloud-based.\n\n### Supported Features\n\nHere the features which are supported by this operator:-\n\n- Deploy submariner broker\n- Join cluster to broker\n- Check k8s server version\n- Support cloud prepare (aws, gcp)\n- Support lighthouse, globalnet enable/disable\n\n## Getting Started\n\n### Demo\n\nA simple demo for deploy broker cluster, join other clusters to the broker cluster, verify service discovery\n\n\u003cimg src=\"./docs/icons/demo.gif\"\u003e\n\n### Example\n\nThe configuration of Knitnet setup should be described in Knitnet CRD. You will find all the examples manifests in [example](./config/samples) folder.\n\n### Prerequisites\n\nKnitnet operator requires a Kubernetes cluster of version `\u003e=1.15.0`. If you have just started with Operators, its highly recommended to use latest version of Kubernetes. And the prepare 2 cluster, example `cluster-a` and `cluster-b`\n\n### Quickstart\n\nThe setup can be done by using `kustomize`.\n\n1. Clone source code\n\n    ```shell\n    git clone https://github.com/tkestack/knitnet-operator.git\n    cd knitnet-operator\n    ```\n\n1. Setup goproxy (optional)\n\n    If you cannot access `GOPROXY=\"https://proxy.golang.org,direct\"`, try `goproxy.cn`\n\n    ```shell\n    go env -w GOPROXY=https://goproxy.cn,direct\n    ```\n\n1. Deploy broker\n\n    - Install knitnet operator\n\n        Switch to `cluster-a`\n\n        ```shell\n        kubectl config use-context cluster-a\n        ```\n\n        Deploy operator\n\n        ```shell\n        make deploy\n        ```\n\n    - Setup `publicAPIServerURL`\n\n      Add `publicAPIServerURL` in `./config/samples/deploy_broker.yaml`, `https://xxx.xxx.xxx.xxx:pppp` must be a public apiserver address, this address should be access by joined cluster.\n      Find the public apiserver URL with command: `kubectl config view  | grep server | cut -f 2- -d \":\" | tr -d \" \"`\n\n      ```yaml\n      apiVersion: operator.tkestack.io/v1alpha1\n      kind: Knitnet\n      metadata:\n        name: deploy-broker-sample\n      spec:\n        brokerConfig:\n          publicAPIServerURL: https://xxx.xxx.xxx.xxx:pppp\n          # defaultGlobalnetClusterSize: 65336\n          serviceDiscoveryEnabled: true\n      ```\n\n    - Deploy broker on `cluster-a`\n\n      ```shell\n      kubectl -n knitnet-operator-system apply -f ./config/samples/deploy_broker.yaml\n      ```\n\n    - Export `submariner-broker-info` configmap to a yaml file\n\n      ```shell\n      kubectl -n submariner-k8s-broker get cm submariner-broker-info -oyaml \u003e submariner-broker-info.yaml\n      ```\n\n1. Join cluster to broker\n\n     - Install knitnet operator\n\n        Switch to `cluster-b`\n\n        ```shell\n        kubectl config use-context cluster-b\n        ```\n\n        Deploy operator\n\n        ```shell\n        make deploy\n        ```\n\n     - Create `submariner-broker-info` configmap\n\n       ```shell\n       kubectl create ns submariner-k8s-broker\n       kubectl apply -f submariner-broker-info.yaml\n       ```\n\n     - Join `cluster-b` to `cluster-a`\n\n       ```shell\n       kubectl -n knitnet-operator-system apply -f ./config/samples/join_broker.yaml\n       ```\n\n### Verify\n\n1. Deploy ClusterIP service on `cluster-b`\n\n    Switch to `cluster-b`\n\n    ```shell\n    kubectl config use-context cluster-b\n    ```\n\n    Deploy `nginx` service\n\n    ```shell\n    kubectl -n default create deployment nginx --image=nginx\n    kubectl -n default expose deployment nginx --port=80\n    ```\n\n1. Export service\n\n   Create following resource on `cluster-b`:\n\n    ```shell\n    kubectl apply -f - \u003c\u003cEOF\n    apiVersion: multicluster.x-k8s.io/v1alpha1\n    kind: ServiceExport\n    metadata:\n      name: nginx\n      namespace: default\n    EOF\n    ```\n\n1. Run `nettest` from `cluster-a` to access the nginx service:\n\n    Switch to `cluster-a`\n\n    ```shell\n    kubectl config use-context cluster-a\n    ```\n\n    Start `nettest` pod for test\n\n    ```shell\n    kubectl -n default  run --generator=run-pod/v1 tmp-shell --rm -i --tty --image quay.io/submariner/nettest -- /bin/bash\n    ```\n    \n    For `kubectl` version \u003e 1.18\n \n    ```shell\n    kubectl run --rm -it --image=quay.io/submariner/nettest nettest -- /bin/bash\n    ```\n\n    Try to curl nginx service created in `cluster-b`\n\n    ```shell\n    curl nginx.default.svc.clusterset.local\n    ```\n\n### Quickstart with Ansible\n\nI don't have any kubernetes cluster, I want a one-click deployment, he came [deploy submariner with ansible](https://github.com/DanielXLee/deploy-submariner/blob/main/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkestack%2Fknitnet-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkestack%2Fknitnet-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkestack%2Fknitnet-operator/lists"}