Kubernetes YAML file - convert Azure to AWS ("file share" volume segment)

Viewed 102

I have my Azure Kubernetes YAML file which works completely in AKS. Now I need to prepare it for AWS. Could you please assist me what has to be changed? I am specifically oriented that most probably file share segment must be modified since "azureFile" segment is specific to Azure (and probably related volumes and volumeMounts must be changed according to that)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontarena-ads-win-deployment
  labels:
    app: frontarena-ads-win-deployment
spec:
  replicas: 1
  template:
    metadata:
      name: frontarena-ads-win-test
      labels:
        app: frontarena-ads-win-test
    spec:
      nodeSelector:
        "beta.kubernetes.io/os": windows
      restartPolicy: Always
      containers:
      - name: frontarena-ads-win-test
        image: local.docker.dev/frontarena/ads:wintest2
        imagePullPolicy: Always
        ports:
          - containerPort: 9000
        volumeMounts:
          - name: ads-win-filesharevolume
            mountPath: /Host
      volumes:
      - name: ads-win-filesharevolume
        azureFile:
          secretName: fa-secret
          shareName: fawinshare
          readOnly: false
      imagePullSecrets:
        - name: fa-repo-secret
  selector:
    matchLabels:
      app: frontarena-ads-win-test
---
apiVersion: v1
kind: Service
metadata:
  name: frontarena-ads-win-test
spec:
  type: ClusterIP
  ports:
  - protocol: TCP
    port: 9001
    targetPort: 9000
  selector:
    app: frontarena-ads-win-test
1 Answers

azurefile is one of the Storage Classes provisionners, that you could replace with, for instance, a AWSElasticBlockStore (AWS EBS)

But you might also benefit from AWS SMS (AWS Server Migration Service) in order to analyze your Azure configuration and generate one for AWS, as explained in "Migrating Azure VM to AWS using AWS SMS Connector for Azure" by Emma White.
You will need to Install the Server Migration Connector on Azure.
The tool has limitations though.

See also AWS Application Migration Service for the applications part.

Related