I found the problem, the container needs to be privileged:
spec:
containers:
- args:
- -c
- atlas deployments setup --type local --bindIpAll --username core --password core --force && tail -f /dev/null
command:
- /bin/sh
image: mongodb/atlas
name: mongo
ports:
- containerPort: 27017
resources:
requests:
cpu: ".5"
memory: 1Gi
securityContext:
privileged: true