{"id":20052594,"url":"https://github.com/devniel/spots","last_synced_at":"2026-06-11T10:31:09.763Z","repository":{"id":142945544,"uuid":"304879354","full_name":"devniel/spots","owner":"devniel","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-21T20:00:35.000Z","size":223,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T08:46:38.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-17T13:04:01.000Z","updated_at":"2023-03-04T05:09:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5ee6c35-3d3f-43a7-8d5e-a2f603b88c23","html_url":"https://github.com/devniel/spots","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devniel/spots","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devniel%2Fspots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devniel%2Fspots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devniel%2Fspots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devniel%2Fspots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devniel","download_url":"https://codeload.github.com/devniel/spots/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devniel%2Fspots/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34195112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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-13T12:18:25.981Z","updated_at":"2026-06-11T10:31:09.758Z","avatar_url":"https://github.com/devniel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spots\n\nAn example monorepo project with local kubernetes deployment done on weekends since July until mid November 2020.\n\n(These steps only apply to my environment, a guide will be publish once my blog engine is updated)\n\nBefore running, start the Ubuntu Server hosted on Hyper-V, minikube will start automatically, otherwise run the following command:\n\n```\nminikube start --insecure-registry \"0.0.0.0/0\"\n```\n\nStart the proxy that serves minikube on the port 8001 of the Ubuntu Server:\n\n```\nkubectl proxy --address='0.0.0.0' --disable-filter=true\n```\n\nExpose the local registry server:\n\n```\n kubectl port-forward -n kube-system $(kubectl get po -n kube-system | grep registry-wnppn | \\awk '{print $1;}') 5000:5000 --address 0.0.0.0\n```\n\nThe pods related to spots, already deployed, should be exposed with port-forwarding; first we get the pod names:\n\n```\n kubectl get po -n=spots\n```\n```\nNAME                         READY   STATUS    RESTARTS   AGE\nspots-api-765999c867-mkz6s   1/1     Running   0          24d\nspots-ui-5b584bb8b9-cfsw7    1/1     Running   0          24d\n```\n\nThen we apply the port-forwarding:\n\n```\nkubectl port-forward -n spots $(kubectl get po -n spots | grep spots-api-765999c867-mkz6s | \\awk '{print $1;}') 3333:3333 --address 0.0.0.0\n```\n\nOn windows, open Powershell with admin permissions, then apply the WSL Forwarding:\n\n```\nEnable-WSLForward\n```\n\nIf you open $PROFILE, the described command is related to the following function:\n\n```\nfunction Enable-WSLForward {\n Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)' -or $_.InterfaceAlias -eq 'vEthernet (Ubuntu-VMSwitch)'} | Set-NetIPInterface -Forwarding Enabled\n Write-Output \"Forwarding enabled, printing interfaces...\"\n Get-NetIPInterface | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table\n}\n```\n\nAfter that, open your Ubuntu (WSL 2) environment, then apply the context to `kube-ctl`.\n\n```\nkubectl config use-context ubuntu-hyper-v\n```\n\n\\* The context has the following configuration:\n\n```\napiVersion: v1\nclusters:\n- cluster:\n    server: http://ubuntu-vm:8001\n  name: ubuntu-hyper-v\ncontexts:\n- context:\n    cluster: ubuntu-hyper-v\n    user: devniel\n  name: ubuntu-hyper-v\ncurrent-context: ubuntu-hyper-v\nkind: Config\npreferences: {}\n```\n\n\\* The `/etc/hosts` has the following config:\n\n```\n# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:\n# [network]\n# generateHosts = false\n127.0.0.1       localhost\n\n192.168.1.15    host.docker.internal\n192.168.1.15    gateway.docker.internal\n127.0.0.1       kubernetes.docker.internal\n192.168.0.2     ubuntu-vm\n192.168.0.2     ubuntu-vm.registry.local\n\n# The following lines are desirable for IPv6 capable hosts\n::1     ip6-localhost ip6-loopback\nfe00::0 ip6-localnet\nff00::0 ip6-mcastprefix\nff02::1 ip6-allnodes\nff02::2 ip6-allrouters\n```\n\nThen open the directory of the monorepo and run the skaffold config with:\n\n```\nskaffold dev --port-forward\n```\n\nIf everything works fine then the tail of the output should be:\n\n```\nDeployments stabilized in 5.2152523s\nPort forwarding service/spots-api in namespace spots, remote port 3333 -\u003e address 127.0.0.1 port 3333\nPort forwarding service/spots-ui in namespace spots, remote port 3000 -\u003e address 127.0.0.1 port 3000\nPress Ctrl+C to exit\nWatching for changes...\n[wait-for-dependent-service] Waiting up to 600 seconds for HTTP 200 from http://spots-api.spots.svc.cluster.local:3333/api/hello\n[wait-for-dependent-service] OK\n[spots-api] [Nest] 1   - 12/21/2020, 7:47:55 PM   [NestFactory] Starting Nest application...\n[spots-api] [Nest] 1   - 12/21/2020, 7:47:55 PM   [InstanceLoader] AppModule dependencies initialized +13ms\n[spots-api] [Nest] 1   - 12/21/2020, 7:47:55 PM   [RoutesResolver] AppController {/api}: +7ms\n[spots-api] [Nest] 1   - 12/21/2020, 7:47:55 PM   [RouterExplorer] Mapped {/api/hello, GET} route +3ms\n[spots-api] [Nest] 1   - 12/21/2020, 7:47:55 PM   [NestApplication] Nest application successfully started +2ms\n[spots-api] [Nest] 1   - 12/21/2020, 7:47:55 PM   Listening at http://localhost:3333/api +4ms\n[spots-ui] /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration\n[spots-ui] /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/\n[spots-ui] /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh\n[spots-ui] 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf\n[spots-ui] 10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf\n[spots-ui] /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh\n[spots-ui] /docker-entrypoint.sh: Configuration complete; ready for start up\n```\n\nOpenning the http://localhost:3000 on the host (Windows 10) shows up the project.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevniel%2Fspots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevniel%2Fspots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevniel%2Fspots/lists"}