Pinned knight
The setting of the game is this: white rook a6 white king g3 black rook g4 black knight f6 and black king g6

you post a game by putting on "insert chess game or diagram" or the board icon on top of the text of comment.
then you clear the position with a garbage icon and then set up your posision

You can't put your own King in check.
If you could (by taking the Rook), why can't your opponent (by taking your King)?
Consider that if king’s were able to be captured, in your proposed position which side would capture the king first and end the game immediately? So I’m Chess it is illegal to allow the king to be captured and therefore you can’t knowingly put your king in a position they could be captured by your opponent.
Have fun with your chess mate!