Kubernetes YAML文件-将Azure转换为AWS(“文件共享”卷段)

zazmityj  于 2022-11-25  发布在  Kubernetes
关注(0)|答案(1)|浏览(125)

我的Azure Kubernetes YAML文件完全可以在AKS中使用。现在我需要为AWS准备它。您能帮助我更改哪些内容吗?我明确指出,最有可能的文件共享段必须修改,因为**“azureFile”段特定于Azure(并且相关的volumeMounts**可能必须据此更改)

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
ijnw1ujt

ijnw1ujt1#

azurefile是存储类资源调配器之一,您可以将其替换为AWSElasticBlockStore(AWS EBS)等
但是,您也可以从AWS SMS (AWS Server Migration Service)中受益,以便分析Azure配置并为AWS生成一个配置,如Emma White在“Migrating Azure VM to AWS using AWS SMS Connector for Azure“中所述。
您将需要Install the Server Migration Connector on Azure
不过,该工具也有局限性。
另请参阅AWS Application Migration Service了解应用程序部分。

相关问题