Local Docker Images on Kubernetes – Docker for Windows

Failed to pull image “testapp:latest”: rpc error: code = Unknown desc = Error response from daemon: pull access denied for testapp, repository does not exist or may require ‘docker login’

Why??? It is there…

I just installed Docker for Windows + Kubernetes on my PC because I wanted to test some changes I made to the Kubernetes C# client, so I quickly created an easy .Net Core Console App and made an image with:

FROM microsoft/dotnet:2.1-sdk-alpine AS build 

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

FROM microsoft/dotnet:2.1-runtime-alpine AS runtime
COPY --from=build /app/out ./
ENTRYPOINT ["dotnet", "TestApp.dll"]

Then I built it with:

docker build -t testapp .

Checked the images in docker:

Good, it is in my local image store. So I could run it now in Kubernetes with the Kube file I created:

apiVersion: batch/v1
kind: Job
  name: testapp-job
    app: testapp
      - name: testapp-job
        image: testapp:v1
      restartPolicy: Never

So I ran:

kubectl create -f .\Kube.yml

And checked the Kubernetes Dashboard:

Well it has nothing to do with the login or the repository. It’s more about the tag, it makes Kubernetes not look into your local store for some reason.

How do you fix this:

Just apply a different tag and use that. As simple as that.

Continue reading “Local Docker Images on Kubernetes – Docker for Windows”

RabbitMQ – Performance and File Descriptors


Imaging you are running RabbitMQ in production, everything is fine…until you introduce a new product or feature which increases the amount of queues and connections you have. Suddenly your system is experiencing a drop in performance at peak time and you have no idea whats going. You log into RabbitMQ management website and under “Overview” the File Descriptors are showing a very low number of available descriptors, it is possible you started with the default number. If you are lucky you started with 4096 if not you might have started with 1024, which is incredibly low unless you are only running on a few queues and connections but in my case I was running with over 10k queues and over 500 connections. So is that number affecting the performance of your RabbitMQ? It certainly does, that number shows you how many file handles and network sockets RabbitMQ has available and you can imagine what happens if its running out of those, like mine was on Saturday afternoon. But the good thing is, you can increase them!

Increase them!

First lets check the limits.

ulimit -a

ulimit -n

Under “open files” you might see 4096, lets change that.

First we are increasing the maximum number of files in sysctl.

nano /etc/sysctl.conf

Add and Save:

fs.file-max = 100000

Now we load sysctl again.

sysctl -p

Continue reading “RabbitMQ – Performance and File Descriptors”