apiVersion: v1
kind: Pod
metadata:
  name: hello-network-isolated
  annotations:
    sandbox.amazonaws.com/network-isolated: "true"   # <-- boot the VM with no network besides loopback
spec:
  runtimeClassName: isolated-sandbox
  containers:
    - name: hello
      image: public.ecr.aws/amazonlinux/amazonlinux:2023
      imagePullPolicy: IfNotPresent
      command: ["sh", "-c"]
      args:
        - |
          echo "/sys/class/dmi/id/product_name:  $(cat /sys/class/dmi/id/product_name)"
          echo "ipv4:    $(awk '/32 host/ {print f} {f=$2}' /proc/net/fib_trie | sort -u | tr '\n' ' ')"
          echo "route:   $(awk 'NR>1 && $2=="00000000" {print "default dev " $1}' /proc/net/route | grep . || echo none)"
          sleep infinity
