mathieu-benoit / sail-sharp

Sail Sharp - Security best practices with .NET Core & Kubernetes
https://medium.com/p/c68ba253844a
3 stars 0 forks source link
container docker dotnet kubernetes security

Sail Sharp - Security best practices with .NET Core & Kubernetes

push-tag promote-env open-pr close-pr

Open in GitHub Codespaces

Associated blog posts:

Deploy the pre-built container with docker and kubectl

Run the pre-built container with Docker:

docker run \
    -d \
    -p 8080:8080 \
    --read-only \
    --cap-drop=ALL \
    --user=65532 \
    ghcr.io/mathieu-benoit/my-sample-workload:latest

Deploy the pre-built container on Kubernetes:

kubectl apply \
    -f deployment.yaml
kubectl apply \
    -f service.yaml

Build and deploy the container with Score with docker compose, kubectl and humctl

Build and run the container with Docker Compose:

make compose-up

make compose-test

Deploy the container in a local Kind cluster:

make kind-create-cluster

make kind-load-image

make k8s-up

make k8s-test

Deploy the pre-built container with Score/Humanitec:

humctl score deploy \
    --token ${HUMANITEC_TOKEN} \
    --org ${HUMANITEC_ORG} \
    --app ${APP_ID} \
    --env ${ENVIRONMENT_ID} \
    -f score/score.yaml \
    -i ghcr.io/mathieu-benoit/my-sample-workload:latest \
    --wait