<p>I am trying to deploy my docker container that contains my ASP.NET Core Web API to my kubernetes cluster and I am getting the following error:</p>

<p><code>&gt;kubectl logs myapp -p</code></p>

<p><code>It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.All', version '2.1.2' was not found.
  - Check application dependencies and target a framework version installed at:
      /usr/share/dotnet/
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&amp;clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.1 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]</code></p>

<p>When I check the installed versions on the node, everything looks like it should support the container:</p>

<p><code>yum info aspnetcore-runtime-2.1</code></p>

<p><code>Installed Packages
Name        : aspnetcore-runtime-2.1
Arch        : x86_64
Version     : 2.1.2
Release     : 1
Size        : 71 M
Repo        : installed
From repo   : packages-microsoft-com-prod
Summary     : Microsoft ASP.NET Core 2.1.2 Shared Framework
URL         : https://www.asp.net/
License     : Apache-2.0
Description : Shared Framework for hosting of Microsoft ASP.NET Core
            : applications. It is open source, cross-platform and is supported
            : by Microsoft. We hope you enjoy using it! If you do, please
            : consider joining the active community of developers that are
            : contributing to the project on GitHub
            : (https://github.com/aspnet/home). We happily accept issues and
            : PRs.</code></p>

<p><code>yum info dotnet-sdk-2.1</code></p>

<p><code>Installed Packages
Name        : dotnet-sdk-2.1
Arch        : x86_64
Version     : 2.1.400
Release     : 1
Size        : 221 M
Repo        : installed
From repo   : packages-microsoft-com-prod
Summary     : Microsoft .NET Core SDK 2.1.400 2.1.400
URL         : https://github.com/dotnet/core
License     : MIT
Description : .NET Core is a development platform that you can use to build
            : command-line applications, microservices and modern websites. It
            : is open source, cross-platform and is supported by Microsoft. We
            : hope you enjoy using it! If you do, please consider joining the
            : active community of developers that are contributing to the
            : project on GitHub (https://github.com/dotnet/core). We happily
            : accept issues and PRs.</code></p>

<p>Even the folder structure (/usr/share/dotnet/shared/Microsoft.AspNetCore.All) only has the 2.1.2 subfolder.</p>

<p>Everything looks like it should work but I still seem to be missing what is holding on to a reference to an older version.</p>

Flea
<p>What's installed on your nodes doesn't matter, because Kubernetes runs containers. You need to build a Docker image which contains all of your dependencies, and have the pod run that Docker image.</p>

<p>Get this working in Docker, push the image to a registry where your Kubernetes cluster can reach it, and then use that image in your pods.</p>
