How to deploy .net core in Kubernetes?

10/21/2019

Recently I started study Kubernetes. And I want to deploy .net core in Kubernetes. How to deploy .net core in Kubernetes ? Maybe there is a simple example ?

-- noute
.net
docker
kubernetes
linux

3 Answers

11/6/2019

If someone will be interesting. I resolved my problem.

steps how. Answer this my conception and this is my opinion:

Before your begin

  • You need have linux machine and docker and Kubernetes.
  • Create Docker Private Registry
  • Create Secret on Kubernetes for Docker

Steps for resolve issue.

  • You need to install a dotnet

  • you need to create project in dotnet

  • afrer that will be next step it is create docker file

  • and build in docker

  • then you need to create tag for your image in Docker

  • and deploy to K8s
-- noute
Source: StackOverflow

10/22/2019

There are lots of resources on the web for the specific mechanics that I will add at the bottom. This is a very broad question and probably not a correct type of question for SO. However, I am going to try to point you in a good direction.

The first step to deploying a .NET Core application to Kubernetes is to understand how to create a container that runs your .NET Core app. This will typically be using Docker.

Once you have a docker container built using a linux image, you will need to publish that image to a container registry so you can define which registry to pull your image from in your Kubernetes yaml. I would recommend you use something like minikube to do it locally.

https://docs.docker.com/engine/examples/dotnetcore/

https://docs.microsoft.com/en-us/dotnet/architecture/containerized-lifecycle/design-develop-containerized-apps/build-aspnet-core-applications-linux-containers-aks-kubernetes

-- Jamie
Source: StackOverflow

10/23/2019

You might consider using OpenShift (which is a Kubernetes distribution). Red Hat provides containers with .NET Core ready to go. It makes things really easy.

Disclaimer: I work for Red Hat.

-- RickJWagner
Source: StackOverflow