def get_zk():
    global _zk
    if _zk is None:
        _zk = KazooClient(
            app.config['ZK_CONNECTION_STRING'],
            default_acl=(
                # grants read permissions to anyone.
                make_acl('world', 'anyone', read=True),
                # grants all permissions to the creator of the node.
                make_acl('auth', '', all=True)
            )
        )
        _zk.start()
        _zk.add_auth('digest', jones_credential)
        _zk.DataWatch('/services', func=ensure_root)
    return _zk