This (forked) repository is being maintained by Go1. Microsoft made the decision to no longer actively maintain the project.
Microsoft had maintained this repository, in addition to a separate repository for a VSCode extension.
This repository builds out a CLI tool, which as far as Go1 could tell, was never actively championed by Microsoft in favor of the VSCode extension. It also builds out the Docker images used for deployment into the Kubernetes cluster when using the service.
Go1 has made the decision to actively maintain the CLI tool, but not the VSCode extension. The reason for this is:
- we continually experienced issues with the VSCode extension not shutting down resources in Kubernetes properly
- the VSCode extension would do stuff like try to manage a local dotnet and kubectl installs, which added unnecesary complexity and caused issues (e.g. kubectl version and kubelet versions out of sync > 3 versions)
- it simply abstracted away the underlying a CLI tool anyway, which seemed to be more robust.
- The Docker images are now maintained in our DockerHub registry
- The CLI tool and Docker images have been upgraded from .NET 7 to .NET 8, the current active LTS version
- The CLI tool is only built using
--self-contained true, so users do not need a local dotnet installation. - The install scripts have been updated to remove the management of dependencies. Users need kubectl ready on their system. An install script for Windows was added.
- The install scripts will pull down a simple wrapper around dsc(.exe), which is installed into the system path as
b2k. This wrapper prompts for service, namespace and ports to expose. There is absolutely no obligation to use this, its just a nice wrapper that we like to use at Go1.
Release version is explicitly required at this time (we may implicitly update this to use the latest release at a later date).
Examples below.
curl -fsSL https://raw.githubusercontent.com/go1com/Bridge-To-Kubernetes/main/scripts/install.sh | bash -s -- 2.2025.0103.0242Open PowerShell and run:
& ([scriptblock]::Create((iwr https://raw.githubusercontent.com/go1com/Bridge-To-Kubernetes/main/scripts/install.ps1 -useb))) -Version 2.2025.0103.0242dsc connect \
--service ${SVC} \
--routing ${ROUTING} \
--namespace ${NS} \
--local-port ${PORT} \
--use-kubernetes-service-environment-variablesWhere:
serviceis the name of the service you want to connect toroutingis a way of isolating the traffic. This is important for ensuring your running service does not interrupt cluster traffic, but can still reach out to other services as if it was in the cluster itself.namespaceis the namespace in the K8s clusterlocal-portis the port your local service is going to run on. Its important to note that a K8sServicemay have multiple ports specified.- Ports will be assigned top to bottom from the deployed
Service - Multiple ports can be opened locally with multiple
--local-portargs. E.g.:dsc connect ... --local-port 3000 --local-port 5000. - The order in which
--local-portis specified matters, first specified maps to first declared in the K8sServiceetc.
- Ports will be assigned top to bottom from the deployed
use-kubernetes-service-environment-variableswill ensure that the environment variables of the running pod are available in the local shell. Can be used with KubernetesLocalProcessConfig.yaml. We have preserved this document as a pdf in the event that Microsoft kills it.
A simple wrapper around dsc with a couple of prompts.
Its convenient to be able to set the SVC, NS and PORT in the environment before executing to skip the prompts.
Go1 forked this because we find it useful developing against our microservice architecture. We will support the best we can. Contributors welcome.