Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations: {}
  labels:
    app/name: sql-server
  name: sql-server
  namespace: sre
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app/name: sql-server
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app/name: sql-server
    spec:
      containers:
        - env:
            - name: ACCEPT_EULA
              value: 'Y'
            - name: MSSQL_SA_PASSWORD
              value: 12345678902222222222222222
            - name: MSSQL_PID
              value: Developer
            - name: MSSQL_AGENT_ENABLED
              value: 'TRUE'
            - name: MSSQL_COLLATION
              value: SQL_Latin1_General_CP1_CI_AS
            - name: MSSQL_LCID
              value: '1033'
          image: mcr.microsoft.com/azure-sql-edge
          imagePullPolicy: IfNotPresent
          name: sql-server
          ports:
            - containerPort: 1433
              name: mssql
              protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /var/opt/mssql
              name: sql-data
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
        - hostPath:
            path: /data/mssql-data
            type: Directory
          name: sql-data

svc

apiVersion: v1
kind: Service
metadata:
  annotations: {}
  labels:
    app/name: sql-server
  name: sql-server
  namespace: sre
spec:
  ports:
    - name: sql
      nodePort: 31433
      port: 1433
      protocol: TCP
      targetPort: 1433
  selector:
    app/name: sql-server
  sessionAffinity: None
  type: NodePort

发表回复

您的电子邮箱地址不会被公开。

Captcha Code