Check out example codes for "deploy golang on minikube". It will help you in understanding the concepts better.

Code Example 1

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-go-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: go-app
  template:
    metadata:
      labels:
        app: go-app
    spec:
      containers:
      - name: go-app-container
        image: dockerbogo/go-app
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 3000

Learn ReactJs, React Native from akashmittal.com