To create an Ephemeral Znode, add -e flag as shown below:-
create -e /path /data
create -e /SecondZnode “Ephemeral-data”
[zk: localhost:2181(CONNECTED) 2] create -e /SecondZnode “Ephemeral-data”
Remember when a client connection is lost, the ephemeral znode will be deleted. You can try it by quitting the ZooKeeper CLI and then re-opening the CLI.