{"id":15137087,"url":"https://github.com/x-ethr/local-kubernetes-playground","last_synced_at":"2026-02-08T02:39:44.987Z","repository":{"id":241433772,"uuid":"806852810","full_name":"x-ethr/local-kubernetes-playground","owner":"x-ethr","description":"Kind Cluster Bootstrap + GitOps - Used for Local Kubernetes Development and Testing","archived":false,"fork":false,"pushed_at":"2024-08-08T01:29:02.000Z","size":8061,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T13:43:07.403Z","etag":null,"topics":["aws","external-secrets","flux","gitops","go","istio","jaeger","kind","kubernetes","kyverno","opentelemetry","prometheus","service-mesh","telemetry","tracing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x-ethr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2024-05-28T03:15:55.000Z","updated_at":"2025-06-27T05:49:36.000Z","dependencies_parsed_at":"2024-06-03T01:34:47.586Z","dependency_job_id":"bbf62f47-79ad-406c-accf-75d8c39e0504","html_url":"https://github.com/x-ethr/local-kubernetes-playground","commit_stats":null,"previous_names":["x-ethr/local-kubernetes-playground"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/x-ethr/local-kubernetes-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-ethr%2Flocal-kubernetes-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-ethr%2Flocal-kubernetes-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-ethr%2Flocal-kubernetes-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-ethr%2Flocal-kubernetes-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x-ethr","download_url":"https://codeload.github.com/x-ethr/local-kubernetes-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-ethr%2Flocal-kubernetes-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29218119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T02:25:35.815Z","status":"ssl_error","status_checked_at":"2026-02-08T02:24:27.970Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","external-secrets","flux","gitops","go","istio","jaeger","kind","kubernetes","kyverno","opentelemetry","prometheus","service-mesh","telemetry","tracing"],"created_at":"2024-09-26T06:43:22.239Z","updated_at":"2026-02-08T02:39:44.958Z","avatar_url":"https://github.com/x-ethr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `local-kubernetes-playground`\n\nSoftware engineers at ETHR previously used a variation of the following project as a playground for software\ndevelopment, automation testing, research, and for demonstrating proof-of-concepts.\n\nThis playground was the motivation behind establishing `x-ethr` and its related open-source repositories.\n\n\u003e [!IMPORTANT]\n\u003e The following project requires an expansive amount of knowledge around development, kubernetes, and overall\n\u003e systems. While the guide can be followed step-by-step to produce a fully functioning cluster, there\n\u003e are [requirements](#requirements) that would otherwise be challenging for beginners to 1. understand, 2. setup, 3.\n\u003e debug.\n\u003e\n\u003e If requirements are correctly met, the entirety of this project can be deployed in under five minutes by simply\n\u003e following the [usage](#usage) section.\n\u003e\n\u003e Users of `local-kubernetes-playground` will involve themselves in the following disciplines:\n\u003e - Software Engineering\n\u003e - DevOps\n\u003e - Systems Administration\n\u003e - GitOps\n\u003e - Databases\n\u003e - Security\n\n## Example\n\n***The Playground's Deployed Service Mesh***\n\n![istio-example](./.documentation/example-istio-service-mesh-3.png)\n\n## Requirements\n\n\u003e [!IMPORTANT]\n\u003e Usage, requirements, and documentation was vetted on a Mac Studio, M1 Max 2022 on MacOS, Sonoma 14.5. Other systems\n\u003e are likely subject to incompatibilities.\n\n###### System\n\n- MacOS with Administrative Privileges\n- [`go`](https://go.dev/doc/install)\n- [`cloud-provider-kind`](https://github.com/kubernetes-sigs/cloud-provider-kind)\n- [Homebrew](https://brew.sh)\n- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/)\n- [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl)\n- [Docker Desktop](https://www.docker.com/products/docker-desktop/)\n- [`istioctl`](https://istio.io/latest/docs/setup/getting-started/)\n- [`ethr-cli`](https://github.com/x-ethr/ethr-cli)\n- [`flux`](https://fluxcd.io/flux/get-started/)\n- [`psql`](https://www.postgresql.org/download/)\n\n###### Optional(s)\n\n- [OpenLens](https://github.com/MuhammedKalkan/OpenLens) - Kubernetes UI Dashboard\n\n## Usage\n\n\u003e [!NOTE]\n\u003e During the first minute or two, there may be a few warnings that surface. Due to Kubernetes reconciliation, all errors\n\u003e should resolve by minute three or four.\n\n1. Install `kind`.\n    ```bash\n    go install sigs.k8s.io/kind@latest\n    sudo install \"$(go env --json | jq -r \".GOPATH\")/bin/kind\" /usr/local/bin\n    ```\n1. Create a cluster via `kind`.\n    ```bash\n    kind create cluster --config \"configuration.yaml\"\n    kubectl config set-context \"$(printf \"%s-kind\" \"kind\")\"\n    ```\n2. Unable node(s).\n    ```bash\n    kubectl label node kind-control-plane node.kubernetes.io/exclude-from-external-load-balancers- \n    ```\n3. Setup a local load-balancer (within its own private terminal session).\n    ```bash\n    go install sigs.k8s.io/cloud-provider-kind@latest\n    sudo install \"$(go env --json | jq -r \".GOPATH\")/bin/cloud-provider-kind\" /usr/local/bin\n    cloud-provider-kind -v 9\n    ```\n4. Verify connectivity to the cluster.\n    - If using OpenLens, select the `kind-kind` context.\n5. Bootstrap.\n    ```bash\n    flux bootstrap github --repository \"https://github.com/x-ethr/cluster-management\" \\\n        --owner \"x-ethr\" \\\n        --private \"false\" \\\n        --personal \"false\" \\\n        --path \"clusters/local\" \\\n        --verbose\n    ```\n    - Requires a valid\n      GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)\n      set as environment variables: `GITHUB_TOKEN`.\n    - For users outside the `x-ethr` organization, fork, import, or copy\n      the https://github.com/x-ethr/cluster-management repository; or use a customized Flux GitOps project.\n6. Sync local cluster repository's `vendors`.\n    ```bash\n    git submodule update --remote --recursive\n    ```\n7. Add `kustomization.yaml` to new cluster directory (only applicable during first-time cluster setup).\n    ```bash\n    cat \u003c\u003c EOF \u003e ./vendors/cluster-management/clusters/local/kustomization.yaml\n    apiVersion: kustomize.config.k8s.io/v1beta1\n    kind: Kustomization\n    resources: []\n    EOF\n    ```\n8. Optionally, update the `Kustomization.flux-system.spec.interval` (changes each time a local cluster is bootstrapped).\n9. Push local changes to `vendors` submodules.\n    ```bash\n    git submodule foreach \"git add . \u0026\u0026 git commit --message \\\"Git Submodule Update(s)\\\" \u0026\u0026 git push -u origin HEAD:main\" \n    ```\n10. Start the local registry.\n     ```bash\n     bash ./scripts/registry.bash\n     ```\n11. Wait for the various resources to reconcile successfully.\n\n### Service-Mesh\n\n*The following command will port-forward the gateway's configured port `80` and expose it on `localhost:8080`.*\n\n```bash\nkubectl port-forward --namespace development services/gateway 8080:80\n```\n\n###### Network Traffic\n\n*In order to view tracing and network traffic, issue the following command(s)*:\n\n```bash\nfor i in $(seq 1 250); do\n    curl \"http://localhost:8080/v1/test-service-1\"\n    curl \"http://localhost:8080/v1/test-service-2\"\n    curl \"http://localhost:8080/v1/test-service-2/alpha\"\n    \n    curl \"http://localhost:8080/v1/authentication\"\ndone\n```\n\n###### Kiali\n\n*The following command will expose the `kiali` service and open a browser to its dashboard.*\n\n```bash\nistioctl dashboard kiali\n```\n\n###### Tracing (Jaeger)\n\n*The following command will expose the `jaeger` service and open a browser to its dashboard.*\n\n```bash\nistioctl dashboard jaeger\n```\n\n###### Istio \u0026 `istoctl`\n\n*Useful `istoctl` command(s)*\n\n```bash\nkubectl -n istio-system logs --since=1h istiod-6bc5bc58b4-wvhmc --follow\n```\n\n###### Redis\n\n*Useful `kubectl` command(s)*\n\n**Logging**\n\n```bash\nkubectl --namespace caching logs --since=10m services/redis --follow\n```\n\n*Useful `redis-cli` command(s)*\n\n```bash\nredis-cli\n```\n\n**Add consumer to consumer group**\n\n```bash\nxadd demo-stream * name john email jdoe@test.com\nxadd demo-stream * tom tom@test.com\n```\n\n## Contributions\n\nPlease see the [**Contributing Guide**](./CONTRIBUTING.md) file for additional details.\n\n## Debugging\n\n###### Ingress LB Address\n\n```bash\nkubectl get --namespace istio-system svc/ingress-gateway -o=jsonpath='{.status.loadBalancer.ingress[0].ip}'\n```\n\n###### (upstream_reset_before_response_started{connection_termination})\n\nRestart the Istio API Gateway Deployment\n\n## External Reference(s)\n\n- [Official Schema Store](https://github.com/SchemaStore/schemastore/tree/master/src/schemas/json)\n    - [OpenAPI 3.1](https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json)\n    - [OpenAPI 3.0](https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json)\n- [AWS EKS, Crossplane, Flux Sample](https://github.com/aws-samples/eks-gitops-crossplane-flux/tree/main)\n    - [Blog Reference](https://aws.amazon.com/blogs/containers/gitops-model-for-provisioning-and-bootstrapping-amazon-eks-clusters-using-crossplane-and-argo-cd/)\n- [Istio By Example](https://istiobyexample.dev/grpc/)\n- [Distributed Tracing](https://istio.io/latest/about/faq/distributed-tracing/)\n- [Slog Guide](https://betterstack.com/community/guides/logging/logging-in-go/)\n- [Tokens \u0026 Microservice(s)](https://fusionauth.io/articles/tokens/tokens-microservices-boundaries)\n- [Golang Reverse Proxy](https://pkg.go.dev/net/http/httputil#ReverseProxy)\n- [JWKS](https://github.com/coreos/go-oidc/blob/v3/oidc/jwks.go)\n- [CoreOS OIDC](https://github.com/coreos/go-oidc/tree/v3)\n- [Example of Microservice Communication](https://supertokens.com/static/6f6a1368b9082a0347063eed943d582b/78612/jwks-flow.png)\n- [Redis Message Broker](https://semaphoreci.com/blog/redis-message-broker)\n- [Kubernetes \u0026 Redis](https://www.dragonflydb.io/guides/redis-kubernetes)\n- [Redis Streams](https://redis.io/docs/latest/develop/data-types/streams/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-ethr%2Flocal-kubernetes-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-ethr%2Flocal-kubernetes-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-ethr%2Flocal-kubernetes-playground/lists"}