Why can't I add Kubernetes support to a .NET Core Console project?

3/14/2019

I'm trying out the Kubernetes tools for Visual Studio. I want to enable Kubernetes support on a Console application, but it won't let me. It only seems to support ASP.NET applications (web/API).

Why is this?

My project consists of a number of Console programs that stand up gRPC endpoints for comms. Why does the tooling only seem to facilitate ASP.NET? Is there a way around it?

-- me--
.net
.net-core
kubernetes
visual-studio

1 Answer

3/22/2019

You can do it manually, and create a script to make it simple:

  1. Create a Dockerfile for each project (dotnet core only of course). You can use Add -> Docker support
  2. Build docker with your solution (with VS or not)
  3. Push it to docker repository using docker push command (I'm almost sure that you are using private hub in Azure)
  4. Deploy your app using kubectl or helm to AKS
  5. Put above commands in script file so you won't do this manually each time
-- Piotr Stapp
Source: StackOverflow