Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.02 KB

File metadata and controls

24 lines (17 loc) · 1.02 KB

Sample backend

This directory contains a sample ASP.NET Core application that acts as a "backend service" within a cluster as well as the definition for the Kubernetes manifests for the ingress controller.

Building the Docker Images

From the base directory for this repo (where the .sln file is), run the commands:

docker build -t backend:latest -f ./samples/KubernetesIngress.Sample/backend/Dockerfile .

Deploying the Backend

  1. Open the backend.yaml file
  2. Modify the container image to match the name used when building the image, e.g. change <REGISTRY_NAME>/backend:<TAG> to backend:latest
  3. Run the command kubectl apply -f ./samples/KubernetesIngress.Sample/backend/backend.yaml
  4. Run the command kubectl apply -f ./samples/KubernetesIngress.Sample/backend/ingress-sample.yaml

To undeploy the backend, run the commands

kubectl delete -f ./samples/KubernetesIngress.Sample/backend/ingress-sample.yaml
kubectl delete -f ./samples/KubernetesIngress.Sample/backend/backend.yaml