Skip to content

Instantly share code, notes, and snippets.

View SergioDiachenko's full-sized avatar

Sergii Diachenko SergioDiachenko

View GitHub Profile
@SergioDiachenko
SergioDiachenko / Local-Kubernetes.md
Created May 18, 2023 14:28 — forked from dahlsailrunner/Local-Kubernetes.md
Helpful tips and snippets for Kubernetes within Docker Desktop

Using the K8s Dashboard Locally

Actual repo is here: https://github.com/kubernetes/dashboard

1. Install the Dashboard

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml

2. Create a Sample User Account that can Access the Dashboard via Token

kubectl apply -f https://gist.github.com/dahlsailrunner/bbd453f3bb6259b66c08a70d0908283f/raw/5727723217e2df4b65d8933adf04d009cfb0fe3f/local-dashboard-account.yml

Central Code within a Library or other location

You can create the following code in some central library or folder if desired:

public static IApplicationBuilder UseCustomSerilogRequestLogging(this IApplicationBuilder app, bool includeHealthChecks = false)
{
    return app.UseSerilogRequestLogging(options =>
    {
        if (!includeHealthChecks)
@SergioDiachenko
SergioDiachenko / SelfSignedCerts-IIS.md
Created April 28, 2023 08:32 — forked from dahlsailrunner/SelfSignedCerts-IIS.md
Selfsigned certs in IIS from PowerShell

Create Authority

New-SelfSignedCertificate -DnsName "KnowYourToolset Cert Authority" -CertStoreLocation "Cert:\LocalMachine\My" -KeyUsage CertSign,CRLSign

Creates root authority with permission to sign stuff

Export-Certificate -Cert Cert:\LocalMachine\My\<CERTHUMB> -FilePath kytroot.cer

Trust Authority

Import-Certificate -FilePath .\kytroot.cer -CertStoreLocation Cert:\LocalMachine\Root

@SergioDiachenko
SergioDiachenko / WindowsTerminal.md
Created April 27, 2023 16:58 — forked from dahlsailrunner/WindowsTerminal.md
Customization and Setup notes for Windows Terminal
@SergioDiachenko
SergioDiachenko / SSL-nginx-Docker.md
Created April 27, 2023 16:57 — forked from dahlsailrunner/SSL-nginx-Docker.md
SSL with Docker images using nginx as reverse proxy

Docker with SSL and an nginx reverse proxy

Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.

Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).

1. Create a conf file with information about the cert you'll be creating

It should look something like the content below; call it my-site.conf or something like that.