Currently browsing: Containers

Switch Context in Kubernetes with Kubectl

In Kubernetes Context is used to group all access parameters for a specific cluster under a convenient name in a kube config file. You can have multiple config files, but right now will focus on the case when you are using just one and all the contexts are in there.

Location of the default config file is

Linux: “~/.kube/config”
Windows: “$HOME\.kube\config”

The Context has three parameters: Cluster, Namespace and User.

When you use the kubectl it is using the current …

Read more

Setup MicroK8s Kubernetes cluster on Ubuntu with ingress and dashboard

So far I have been using only Docker Desktop and the Kubernetes provided with it. It is good enough for development, but I wanted to expose my services so I can access them through the internet and to know that they will start again on machine restart. In addition I would like to run them in a virtual machine (VM), so Windows is no longer an option. That means I need something else. For me the option is Linux and …

Read more

Fix Unable to unprotect the message.State. exception on Identity Server redirect

After fixing the 502 Bad Gateway issue I hit another one.

Here is the exception I have from the logs

HTTP POST /signin-oidc responded 500 in 77.6515 ms

System.Exception: An error was encountered while handling the remote login. —> System.Exception: Unable to unprotect the message.State. — End of inner exception stack trace — at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

As mentioned in the previous post – when I run from Visual …

Read more

Nginx Proxy Manager and Let’s Encrypt certificates

hero

In my previous for Nginx and Nginx Proxy Manager (NPM), I wrote on how to install NPM, but didn’t configure any certificates.

Out of the box Nginx Proxy Manager supports Let’s Encrypt SSL auto creation and renewal.

There is one limitation – you can create certificates only for specific domains/subdomains directly. If you want to create wildcard certificate you will need to use DNS Challenge.

What does that mean? You need to use some DNS server that allows API …

Read more

NginX as a reverse proxy with Nginx Proxy Manager

Lately I have started playing with Kubernetes and wanted to expose some of the locally hosted services on internet. The situation is that I want to expose multiple clusters running on separate machines through the same IP address and port. Checking around it seems nginx is the the best option. Keep in mind that even you want to expose just one service it is still good idea to do it through nginx.

I have installed Ubuntu 20.04.3 on Raspberry Pi …

Read more