{ "info": { "author": "Dmitry Bashkatov", "author_email": "dbashkatov@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development", "Topic :: System :: Networking" ], "description": "# krok\n*as in ngrok*\n\nExpose your local TCP server as Kubernetes service in remote cluster.\n\n\n## Usage\n\nGiving we want to create service in `namespace` with name `service_name` on port `service_port` forwarding all traffic from it to `local_host` (usually 127.0.0.1) and `local_port`.\n\n1. Install krok client: `pip install krok`\n\n2. Install krok server: `kubectl -n run --image=smpio/krok-server krok`\n\n3. Run krok: `krok -n -l -p `\n\nNote: `local_host` can be any host reachable from your machine, but usually `127.0.0.1` is the most useful.\n\n\n## How it works\n\nWe have running krok server in the pod `krok_pod` in `namespace`. The server is simple OpenSSH server that allows to forward incoming connections.\n\nKrok client is simple script that automates the following steps:\n\n1. Run `kubectl port-forward :22`. It will listen on random `local_ssh_port` forwarding all connections to krok's OpenSSH server on `krok_pod`.\n\n2. Run `ssh -N -R *:0:: -p krok@localhost`. This causes krok's OpenSSH server on `krok_pod` to listen on random `pod_port` forwarding all connections to `local_host:local_port` using SSH tunnel.\n\n3. Create or update service `service_name` with port `service_port` and targetPort `pod_port`, with selector matching `krok_pod`.\n\nIn the result, all connections to `service_name:service_port` will be forwarded to `krok_pod`, then to your local machine via SSH tunnel forwarded by `kubectl port-forward`, and then forwarded by SSH client to `local_host:local_port`.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/smpio/krok", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "krok", "package_url": "https://pypi.org/project/krok/", "platform": "", "project_url": "https://pypi.org/project/krok/", "project_urls": { "Homepage": "https://github.com/smpio/krok" }, "release_url": "https://pypi.org/project/krok/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Expose your local TCP server as Kubernetes service in remote cluster.", "version": "1.0.0" }, "last_serial": 4312503, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "599ea45248df5f3adc955b0f6cecae3b", "sha256": "22d2c335905f1155660eea7293a76ac31c062a828dec330e202de6a707366d14" }, "downloads": -1, "filename": "krok-1.0.0.tar.gz", "has_sig": false, "md5_digest": "599ea45248df5f3adc955b0f6cecae3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4390, "upload_time": "2018-09-26T13:26:27", "url": "https://files.pythonhosted.org/packages/37/5f/3a8036b41fd6655f1679b475ecdd27ea78754233271c890d76450b1c452e/krok-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "599ea45248df5f3adc955b0f6cecae3b", "sha256": "22d2c335905f1155660eea7293a76ac31c062a828dec330e202de6a707366d14" }, "downloads": -1, "filename": "krok-1.0.0.tar.gz", "has_sig": false, "md5_digest": "599ea45248df5f3adc955b0f6cecae3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4390, "upload_time": "2018-09-26T13:26:27", "url": "https://files.pythonhosted.org/packages/37/5f/3a8036b41fd6655f1679b475ecdd27ea78754233271c890d76450b1c452e/krok-1.0.0.tar.gz" } ] }