apiVersion: apps/v1
kind: Deployment
metadata:
  name: mydeployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: myspringbootapp
  template:
    metadata:
      labels:
        app: myspringbootapp
    spec:
      containers:
        - name: myspringbootapp
          image: vikashashoke/mydemoapplication:latest
          imagePullPolicy: Always
          ports:
            - name: myspringbootapp_port
              protocol: TCP
              containerPort: 9099
---
apiVersion: v1
kind: Service
metadata:
  name: myservice
  labels:
    app: myspringbootapp
spec:
  selector:
    app: myspringbootapp
  type: LoadBalancer
  ports:
  - name: myspringbootapp
    protocol: TCP
    port: 80
    targetPort: 9099
    nodePort: 30036
