Not really on-topic but does anyone have a "fake" Kubernetes? More than just an API server that serves canned responses, but something that actually runs the control loops but doesn't run any containers. For example, I could configure it in advance like:

   containers:
     image: foo/bar:1.2.3
     produce_logs: "hello this is fake foo/bar"
Then kubectl apply a manifest like:

   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: foobar
   spec:
     replicas: 1
     template:
       spec:
         containers:
            - name: foobar
              image: foo/bar:1.2.3
Then run a command like "kubectl get pods":

    NAME                      READY   STATUS    RESTARTS   AGE
    foobar-abcd123456-f0ob4   2/2     Running   0          1s
Or even "kubectl get logs foobar-abcd123456-f0ob4":

    hello this is fake foo/bar!
Basically, this would let you test things that interact with kubernetes, without having to have a cluster. This thing would just be a library that you link against your tests, or a program that you start up next to your tests, and it gets you most of the way there. It's better than a fake apiserver you write yourself, where you "know" that the service controller looks at pods that match a selector, then produces endpoints objects that contain that IP address; you could write this kind of low-overhead test without having to know those things (or get it wrong, and code your app to a k8s spec that doesn't exist except in your own mind).

That's what I'd really like.

Not quite fake: but this might be close enough? https://github.com/kubernetes-sigs/kind

Alternatively you could create a CRI plugin that does what you want. https://github.com/kubernetes/kubernetes/blob/242a97307b3407...