The emulator on this site cannot run containers. An emulated CPU has no nested virtualisation, so Docker and Kubernetes are out of reach there no matter how much you tune it. That is a hard limit, not a missing feature.
Google Cloud Shell is the way around it. It is a Linux VM Google hands you for free, with Docker and root already on it, which is exactly what the manuals in my writeups need. It runs under your own Google account, so nothing here costs me anything and a burst of traffic cannot exhaust anyone's quota but the visitor's own.
It opens in a new tab rather than inside this page. Google sends X-Frame-Options: SAMEORIGIN
on Cloud Shell and DENY on its sign-in page, so no other site is allowed to put it in a
frame. That is deliberate: a Google login form embedded in someone else's page is how phishing works, and
the block is the fix.
What you get
- a Linux VM with
dockerand fullsudo - 50 hours a week, per Google account, reset weekly
- 5 GB of persistent home directory, though this session does not use it
- an ephemeral machine: the link sets
ephemeral=true, so everything is destroyed when the tab closes
How to start
The button opens Cloud Shell and clones a small public repository with one setup script in it. Four steps, and the first two happen on their own.
1. Trust the repository. Cloud Shell asks before cloning anything that is not Google's own. The prompt says the repo is untrusted by default, which is about who owns it, not about what is in it. There are three short files and you can read them on GitHub first.
2. Read what it prints. Once cloned, the terminal prints the next command and drops you in the right directory. You should see this:
You are in Google Cloud Shell, on a machine Google gives you for free.
Docker and root are already here. kind and kubectl are not, so install them:
./setup.sh 3. Install the two missing pieces. Docker is there, kind and kubectl are
not, so the script fetches them from their official release URLs and prints the versions it ended up with:
./setup.sh 4. Follow the writeup. From here the commands in the article work as written. For the Kyverno walkthrough that means:
kind create cluster --name policy-demo
kubectl cluster-info --context kind-policy-demo When you are done
The session is ephemeral, so closing the tab is enough. Deleting the cluster first is still the tidy habit, and it is the same command you would run on a laptop:
kind delete cluster --name policy-demo What this costs you
Honesty matters more here than on the rest of this page. The emulator runs on your machine and sends nothing anywhere. This does the opposite: the terminal runs on Google's servers, under your Google account, and everything you type there goes to Google under the terms you already have with them. I have no access to any of it, and I am not paying for it either.
If that trade is not one you want to make, the walkthrough runs on any laptop with Docker. Cloud Shell is a convenience, not a requirement.