apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: test
  template:
    metadata:
      labels:
        app.kubernetes.io/component: test
    spec:
      containers:
        - image: test/test
          name: server
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
