Actually, we can say that based on the quantum configuration, the last shell of each atom can contain just 8 electron.( I mean the S and P orbitals) but the question is, why this configuration is stable, or why the noble gases with this configuration cannot eject or receive any electron. The answer is the symmetry! symmetry and coupling in the S and P orbitals cause a new stability that the noble gases would not like to loss it. For example, if they want to get an electron, there is no space for it in the present shell so it should go to upper shell that means instability in the electron configuration and on the other hand, the shielding effect of other electron cause low positive charge that is felt by the last electron. Above all, changing in the symmetry cause the problem. So noble gas cannot get electron. On the other hand, they cannot loss an electron. Since If they want to loss, beside losing the symmetry of orbital configuration, it will cause on additional positive charge on all electron since new shielding effect situation, that is not stable. It will also cause the unbalanced configuration of orbitals. So noble gases with octet configuration won’t like to loss or get electron since their symmetry in the electron configuration and the most balanced electron shielding effect and also, positive charge that each electron feels. With all this taken to account noble gases have high ionized energy since they are at the lowest energy one can has, and cation and anion like to loss electron and get to achieve this balanced and symmetrical configuration. In the metals, the last electron in the outer shell feel low positive charge from nucleus and can easily drop its electron and achieve the octet configuration and become cation. In non metals, they could able to get an electron to complete their free spaces of their orbitals and also balanced their P orbital with the best shielding effect and attain octet configuration.