apiVersion: v1
kind: Namespace
metadata:
  name: my-volcano

---

apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
  name: test
  namespace: my-volcano
spec:
  weight: 1
  reclaimable: false
  capability:
    cpu: 2
--- 

apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: test-job
  namespace: my-volcano
spec:
  minAvailable: 1
  schedulerName: volcano
  queue: test
  tasks:
    - replicas: 1
      name: nginx
      policies:
      - event: TaskCompleted
        action: CompleteJob
      template:
        spec:
          containers:
            - command:
              - sleep
              - 10m
              image: nginx:latest
              name: nginx
              resources:
                requests:
                  cpu: 1
                limits:
                  cpu: 1
          restartPolicy: Never