<p>I am very new to development on Azure ASE and I am working on an existing Azure cloud solution that has Service Bus receiving messages from a UI and the message events start Azure (on-demand) Web Jobs at various points in the solution.</p>
<p>Similar to this:
<a href="https://i.stack.imgur.com/l7BtS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l7BtS.png" alt="enter image description here" /></a></p>
<p>We are hosting most parts of the solution on ASE and the plan is to move off ASE and onto Kubernetes (AKS) instead (at the moment, I've setup AKS with windows as the OS just to start playing with it).</p>
<p>What options are there for moving Web Jobs off ASE and onto AKS?  Does the OS have a bearing on the options? Can the WebJobs SDK be installed in the AKS cluster to run WebJobs (and are they executable from Service Bus for example)? I know you can setup scheduled Jobs, but what would be the equivalent for on-demand web jobs (long running processes).</p>
<p>Any advice much appreciated.  We have a similar migration of Azure Functions, but I think if I can understand how to shift Web Jobs, the Functions will naturally follow the same path.</p>

Rob
<p><em>Having spent more time on this, here's some information which has helped me (you can see from the question above that there are gaps in my understanding, building my knowledge up slowly and publishing in case its useful for others).</em></p>

<p>Moving WebJobs off ASE - this is not as straight forward as my question implies.  Essentially, the WebJobs themselves output an exe and the required libs, similar to the output of a command line app.  The WebJobs (their code) run a "JobHost" in the Main method, which has a host waiting for triggers to run the jobs within.  Looks very similar to me in how WCF services would have been hosted in a Windows Service a few years back.</p>

<p>With that in mind, first, the WebJob .exe can be run on the local host OS.  As we are using .net Framework version of WebJobs, we can only deploy to Windows (maybe with Mono it is possible to run on Linux, but for now I'm saying Windows only to keep things simple).  Had we built the WebJobs using .net Core then arguably they could have been to a Windows or Linux host OS.</p>

<p>Secondly, we want to "containerise" the compiled output of a WebJob - so a docker image needs to be built containing the WebJob and dependencies, so it can be deployed into a cluster (this is the point I'm currently at and trying to define the docker file). Read more about <a href="https://docs.docker.com/get-started/" rel="nofollow noreferrer">Docker Containers here</a>.</p>

<p>Thirdly, the cluster itself.  I'd mentioned AKS.  There are other options, such as Service Fabric but it's a Microsoft proprietary SDK, so maybe best to steer clear for now.  You can deploy your docker image containing your WebJob .exe (and libs) to your cluster as you need.  The cluster can manage scaling of your containers as required. 
NOTE: you can run <a href="https://kubernetes.io/docs/tasks/tools/install-minikube/" rel="nofollow noreferrer">Minikube</a> locally which helps get to grips</p>

<p>This is a high level description, but clarifies my question above and gives some information which I found useful.  Hopefully helps others who have DevOps trust upon them! :)</p>
