{"id":18666769,"url":"https://github.com/paralus/relay","last_synced_at":"2025-08-22T00:32:22.691Z","repository":{"id":38365827,"uuid":"465280708","full_name":"paralus/relay","owner":"paralus","description":"Relay server and agent for kubernetes cluster interactions","archived":false,"fork":false,"pushed_at":"2024-12-02T14:17:53.000Z","size":52936,"stargazers_count":9,"open_issues_count":13,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-09T05:42:41.100Z","etag":null,"topics":["hacktoberfest","hacktoberfest2023","just-in-time-access","mtls-authentication","web-socket","ztka-agents"],"latest_commit_sha":null,"homepage":"https://www.paralus.io/","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/paralus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-02T11:39:44.000Z","updated_at":"2024-09-05T10:24:46.000Z","dependencies_parsed_at":"2023-02-17T22:46:00.418Z","dependency_job_id":"0d996f8f-e73c-4e5f-97ec-08ab4e1beef0","html_url":"https://github.com/paralus/relay","commit_stats":{"total_commits":106,"total_committers":14,"mean_commits":7.571428571428571,"dds":0.6509433962264151,"last_synced_commit":"ec2de9bf0958d4cee9aa3db4c1f2f4dffae0e611"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralus%2Frelay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralus%2Frelay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralus%2Frelay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paralus%2Frelay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paralus","download_url":"https://codeload.github.com/paralus/relay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542288,"owners_count":18242332,"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":["hacktoberfest","hacktoberfest2023","just-in-time-access","mtls-authentication","web-socket","ztka-agents"],"created_at":"2024-11-07T08:33:59.855Z","updated_at":"2025-08-22T00:32:22.669Z","avatar_url":"https://github.com/paralus.png","language":"Go","readme":"# Paralus relay-server / relay-agent\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fparalus%2Frelay.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fparalus%2Frelay?ref=badge_shield)\n\n\nRelay server and agent for kubectl access.\n\n## Development Setup\n\nRelay depends on [paralus](https://github.com/paralus/paralus) and you need to check out this repo.\n\n### Using docker-compose\n\nRun following Docker Compose command to setup all requirements like Postgres db, Kratos etc. for core.\n\nThis will start up postgres and elasticsearch as well as kratos and run the kratos migrations. It will also run all the necessary migrations. It also starts up a mail slurper for you to use Kratos.\n\n  `docker-compose --env-file ./env.example up -d`\n\nStart paralus:\n\n  `go run github.com/paralus/paralus`\n\n### Paralus Relay Server\n\nGet peer client token for relay.\n\nOpen the admindb postgress and execute below SQL to fetch the token.\n\n```bash\nadmindb=# select token from sentry_bootstrap_agent_template where name='paralus-sentry-peering-client';\n        token         \n----------------------\n brhsrbbipt349qt0qad0\n\n```\n\nUse above token set the environment variable for relay-server\n\n```bash\nexport RELAY_PEERING_TOKEN=brhsrbbipt349qt0qad0\nexport PARALUS_RELAY_PEERSERVICE=http://peering.sentry.paralus.local:10001 \nexport POD_NAME=relay-pod1\ngo run main.go --mode server --log-level 3\n```\n\n### Paralus Relay Agent\n\nGet the config for paralus relay agent\n\n```bash\ncurl http://localhost:11000/infra/v3/project/:metadata.project/cluster/:metadata.name/download\n```\n\nUse the values of relay-agent-config and apply in the cluster.\n\n```bash\nkubectl -n paralus-system get cm/relay-agent-config -o yaml\n\napiVersion: v1\ndata:\n  clusterID: 4qkolkn\n  relays: '[{\"token\":\"brht3cjipt35cb3kfjag\",\"addr\":\"api.sentry.paralus.local:11000\",\"endpoint\":\"*.core-connector.relay.paralus.local:443\",\"name\":\"paralus-core-relay-agent\",\"templateToken\":\"brhsrbbipt349qt0qae0\"}]'\nkind: ConfigMap\nmetadata:\n  creationTimestamp: \"2020-04-28T07:10:53Z\"\n  name: relay-agent-config\n  namespace: paralus-system\n  resourceVersion: \"3127787\"\n  selfLink: /api/v1/namespaces/paralus-system/configmaps/relay-agent-config\n  uid: e5fb5c16-c659-46d3-805f-3a2f3b73e9d7\n```\n\n```bash\nkubectl apply -f \u003cfile-name\u003e\n```\n\nRun relay-agent\n\n```bash\nexport POD_NAME=relay-agent-pod1\ngo run main.go --mode client --log-level 3\n```\n\nSetup the local /etc/hosts file to resolve below hostname to localhost\n\n```bash\n127.0.0.1\tpeering.sentry.paralus.local\n\n127.0.0.1\trx28oml.core-connector.relay.paralus.local\n127.0.0.1\t4qkolkn.core-connector.relay.paralus.local\n\n127.0.0.1\trx28oml.user.relay.paralus.local\n127.0.0.1 4qkolkn.user.relay.paralus.local\n```\n\nDownload kubeconfig\n\n```bash\ncurl http://localhost:11000/v2/sentry/kubeconfig/user?opts.selector=paralus.dev/clusterName=c-4\n```\n\nSave the contents to a file and use for kubectl\n\n```bash\nkubectl --v=6 --kubeconfig /\u003cPATH\u003e/kubeconfig-c-5 get pod -A\n```\n\n## Examples\n\n```bash\nexport PARALUS_SENTRY=http://sentry.paralus.dev:9000\nexport PARALUS_RELAY_PEERSERVICE=http://peering.sentry.paralus.local:7001\n\nexport RELAY_USER_DOMAIN=\"user.relay.paralus.local\"\nexport RELAY_CONNECTOR_DOMAIN=\"core-connector.relay.paralus.local\"\n\nexport RELAY_TOKEN=bqfvhabipt3a2g46986g\nexport RELAY_USER_TOKEN=bqfvhabipt3a2g46987g\nexport RELAY_CONNECTOR_TOKEN=bqfvhabipt3a2g469870\nexport RELAY_LISTENIP=127.0.10.1\n```\n\n## Community \u0026 Support\n\n- Visit [Paralus website](https://paralus.io) for the complete documentation and helpful links.\n- Join our [Slack channel](https://join.slack.com/t/paralus/shared_invite/zt-1a9x6y729-ySmAq~I3tjclEG7nDoXB0A) to post your queries and discuss features.\n- Tweet to [@paralus_](https://twitter.com/paralus_/) on Twitter.\n- Create [GitHub Issues](https://github.com/paralus/relay/issues) to report bugs or request features.\n\n## Contributing\n\nThe easiest way to start is to look at existing issues and see if there’s something there that you’d like to work on. You can filter issues with the label “Good first issue” which are relatively self sufficient issues and great for first time contributors.\n\nOnce you decide on an issue, please comment on it so that all of us know that you’re on it.\n\nIf you’re looking to add a new feature, raise a [new issue](https://github.com/paralus/relay/issues) and start a discussion with the community. Engage with the maintainers of the project and work your way through.\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fparalus%2Frelay.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fparalus%2Frelay?ref=badge_large)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparalus%2Frelay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparalus%2Frelay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparalus%2Frelay/lists"}