How to migrate windows scheduled job(exe) to AKS?

Pratim Das, Partha C 266 Reputation points

One on - premise enterprise application needs to be migrated to AKS. Multiple windows scheduled jobs need to be migrated to AKS. What is the best practice?

  1. Should we keep it in AKS and schedule? if yes then how?
  2. Should use any other Azure service to accomplish? if yes then how?
  3. Can we use Control-M agent for that?
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,849 questions
{count} votes

Accepted answer
  1. prmanhas-MSFT 17,886 Reputation points Microsoft Employee

    @Pratim Das, Partha C Firstly, apologies for the delay in responding on this and any inconvenience this issue may have caused.

    Are workloads mentioned already running in containers as I suspect not based on the detail provided? If it isn’t then you can refer to this article.

    There is not enough info to provide a good recommendation, however, have you looked at CronJob resource in k8s?

    Here’s an example of such job definition:

    apiVersion: batch/v1beta1  
    kind: CronJob  
      name: {{ include "deploymentName" . }}  
    {{ include "labels" . | indent 4 }}  
      schedule: "0 */1 * * *" # Once an hour  
      concurrencyPolicy: Replace  
    {{ include "retrieve-secrets-spec" . | indent 6 }}  

    It includes below line:

    {{- define "retrieve-secrets-spec" -}}  
        serviceAccountName: {{ }}  
        restartPolicy: OnFailure  
        {{- with .Values.keyvaultAgent.nodeSelector }}  
        {{- toYaml . | nindent 6 }}  
        {{- end }}  
          - name: "{{ .Values.keyvaultAgent.image.pullSecret }}"  
          - name: keyvault-agent  
            image: "{{ .Values.keyvaultAgent.image.repository }}:{{ .Values.keyvaultAgent.image.tag }}"  
            imagePullPolicy: {{ .Values.keyvaultAgent.image.pullPolicy }}  
              - name: SERVICE_PRINCIPLE_FILE_PATH  
                value: /host/azure.json  
              - name: VAULT_BASE_URL  
                value: "{{ .Values.keyvaultAgent.vaultBaseUrl }}"  
              - name: CREATE_KUBERNETES_SECRETS  
                value: "true"  
              - name: SECRETS_NAMESPACE  
                value: "{{ .Values.keyvaultAgent.secretsNamespace }}"  
              - name: SECRETS_FOLDER  
                value: /secrets  
              - name: SECRETS_KEYS  
                value: "{{ .Values.keyvaultAgent.secretNames}}"  
              - name: SECRETS_TYPE  
                value: ""  
              - name: host-sp  
                mountPath: /host  
                readOnly: true  
          - name: host-sp  
              # this file contains the cluster service-principal, it exists on every node by default  
              path: /etc/kubernetes  
    {{- end -}}  

    Moreover I will recommend to open a Support Ticket with Azure Technical Support since they will have right tools and expertise to help you out with your ask. If you have a support plan, requesting you to file a support ticket, else please do let us know, we will try and help you get a one-time free technical support.

    Hope it helps :)

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics

    0 comments No comments

0 additional answers

Sort by: Most helpful