I posted something similar on this topic a few days ago. There are a few tools for declarative configuration and synchronization of realm state.
Most of the above can/should be run as a separate Job in k8s, or in some cases as an initContainer.
kc.sh import ... is good for dev or first time realm creation, but not good to run each time you start a container.