<p>I am a newbie for <code>operator-sdk</code>. Now I am writing test for operator with <code>envtest</code> framework, so I had a fake control-plane for environments.</p>
<p>Inside controller reconcile loop, once I initialize a CR, then controller will pull down an image for pod and deploy that Pod.</p>
<p>All behaviour in the above happens in the real k8s cluster. My question is, under <code>envtest</code> environemnts, does controller really pull down image for deploying Pods?</p>

Joe
<p>That depends on <code>envtest</code> configuration. Here is quotes from <a href="https://book.kubebuilder.io/reference/envtest.html" rel="nofollow noreferrer">kubebuilder book</a>:</p>
<blockquote>
<p>[envtest] setting up and starting an instance of etcd and the Kubernetes API server, without kubelet, controller-manager or other components</p>
</blockquote>
<blockquote>
<p>Unless you’re using an existing cluster, keep in mind that no built-in controllers are running in the test context</p>
</blockquote>
<p>So, if you don't set <code>USE_EXISTING_CLUSTER</code> env var to true, <code>envtest</code> will set control plane with only API server and etcd. For example, if your controller should create Deployment at some event, there's no deployment controller in test environment that gonna create ReplicaSet and Pods. Basically, all it does is stores state of test environment in etcd.</p>
