Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Code Block
    themeMidnight
    titlek8s-deploy.yml
    linenumberstrue
    ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: redisspring-demo
      spec:
        selector:
          matchLabels:
            app: redisspring-demo
      replicas: 3
     replicas template: 1
        templatemetadata:
          metadatalabels:
            labelsapp: spring-demo
        spec:
          appcontainers:
     redis
         - specname: spring-demo
            containers: image: sooabia/spring-demo:1.0
            - nameports:
     redis
           - containerPort:  image: redis8080
    ---
    kind: Service
    apiVersion: v1
    metadata:
      name: spring-service
    spec:
      selector:
        app: spring-demo
      ports:
      - protocol: TCP
        port:  - containerPort: 637980
        targetPort: 8080
      type: LoadBalancer
    ---
      apiVersion: apps/v1
      kind: DeploymentStatefulSet
      metadata:
        name: spring-demoredis
      spec:
        selector:
          matchLabels:
            app: spring-demoredis
        replicas: 31
        template:
          metadata:
            labels:
              app: spring-demoredis
          spec:
            containers:
            - name: spring-demoredis
              image: sooabia/spring-demo:1.0
    redis
              ports:
              - containerPort: 8080
    --- 
    kind: Service
    apiVersion: v1
    metadata:
      name: spring-service
    spec:
      selector:6379
              volumeMounts:
              - name: data
                mountPath: ./data
        volumeClaimTemplates:
        - metadata:
            name: data
          spec:
            accessModes: [ "ReadWriteOnce" ]
        app: spring-demo
        portsresources:
        - protocol: TCP
        portrequests:
     80
           targetPort: 8080
      typestorage: LoadBalancer1Gi
    --- 
    kind: Service
    apiVersion: v1
    metadata:
      name: redis
    spec:
      selector:
        app: redis
      ports:
      - protocol: TCP
        port: 6379
        targetPort: 6379
      type: ClusterIP

...