Many games which contain a minimap do it by placing a second camera looking down from some height at the player. While it may be easy, it is taxing on resources.
We will not be using a camera to save the resources (there is no noticeable drop in FPS from using this minimap).
First, we need a texture for the minimap to use. I will not be covering it but you basically have several options:
1) use a second camera to capture a top-down view once and save it to file
2) draw a minimap in a graphics editor of your choice
3) generate the minimap procedurally by using the Image class, and more specifically the put_pixel(x,y, color) functions
Personally I do 3) but you can do whichever.
Once you have the texture you can proceed with the tutorial.

The map's elements are placed under a container so that we can later switch off everything in one go if we wish to.
Note down the size of your map and place it so that it is centered on the middle (where the arrow is). If your map is 1000x1000 px, a good value for pos (remember, it's relative to the parent Node2D) is -500, -500 (see the idea?)
The border is not mandatory, it's just a nice-to-have visual addition, and the player_arrow is not the real arrow we'll be using, it's there for reference so that you know where the middle of your setup is. If you don't want/need rotation, you can dispense with the Node2D.
Attach the minimap to the player as soon as you have the scene set up.

You probably want the minimap to pan, here's how to do it:
This shader takes care of panning via the X and Y uniforms. Adjust the radius of the circle mask as you see fit. If you don't want/need the mask, you can comment out the if block.
Attach this script to the top-most scene node (the control).

All this script does is relate the player's x and y position to the X and Y uniforms of the shader so that the map pans.
Attach this script to the texture frame containing your minimap texture:

Here the uv offset is hardcoded, but it equals 1/(your texture's size in pixels) - and the calculation is the main reason it lives in this script and not under the topmost node. We also register ourselves with the topmost node.
At this point, you have a panning minimap. But we probably want the map to rotate, too!
Fortunately rotation is simple as it needs only one script.

We're done with the map!!!
Well, yes, but many minimaps feature arrows or dots for AI and/or points of interest, don't they?
NOTE: For the arrows to match the minimap texture positions, you need the minimap to rotate. If the minimap doesn't rotate, they will seem placed weirdly relative to what you see on the map.

Our topmost node preloads the icons we need.

The player_pos is derived from the reference arrow we have in the scene... Writing it down in the script is probably faster that getting it via code, besides it isn't gonna change at all.

These functions calculate the arrow positions.

Here we process the arrows. If they exceed the maximum distance, they disappear. (For best results, set the max distance a bit smaller than the radius of your minimap - otherwise you'll see the arrow beyond it because the arrow's position is its top left point)