apiVersion: v1
kind: Service
metadata:
  name: application-cpu
  labels:
    app: application-cpu
spec:
  type: ClusterIP
  selector:
    app: application-cpu
  ports:
    - protocol: TCP
      name: http
      port: 80
      targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: application-cpu
  labels:
    app: application-cpu
spec:
  selector:
    matchLabels:
      app: application-cpu
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: application-cpu
    spec:
      containers:
      - name: application-cpu
        image: aimvector/application-cpu:v1.0.2
        imagePullPolicy: Always
        ports:
        - containerPort: 80
        resources:
          requests:
            memory: "50Mi"
            cpu: "500m"
          limits:
            memory: "500Mi"
            cpu: "2000m"