Go inside and hang from the rope that releases the gear lock. Go outside and climb on the windmill arms, turning them counter-clockwise. This will open the roof dome.
The windmill is at the far right side of the island. There are three areas : the Village, the Castle, and the Mill.
go pass the windmill and on the ladder is the rope.
The rope is on the water wheel on the right side of the windmill.
The attic of the windmill doesn't have a key, only an ingenious secret. (see the releated question)
Follow Don Quixote.
in the top of the windmill
Inside the windmill, climb into the loft and hang on the rope. This will release the gear lock and allow the windmill arms to turn. Jump up on them to turn them counter-clockwise, which will open the roof dome.
you have to unlock the windmill
You do not get or use a bucket on Astro Knights Island.
Keep going to the right until you reach the windmill, which is the third section of the Island (the other two are the village and the castle).
There is no treasure chest on Astro Knights Island.
You use it to power the hover board (hovercraft) in the attic of the windmill. (see related question)