The electronic configuration of atoms in which the valence shell possesses eight electrons is regarded as a stable electronic configuration. The octet rule refers to the tendency of atoms to have eight electrons in their valence shell either by transfer (gaining or losing) of valence electrons from one atom to another or by sharing of valence electrons. When atoms have fewer than eight electrons, they tend to react to attain an octet configuration and form more stable compounds.
We know that K shell is the only shell which cannot possess more than two electrons. Thus, when there are two electrons in the K shell, it becomes fully filled and the filling of next shell begins. The duplet rule is applicable to only smaller atoms like Hydrogen, Helium and Lithium. The duplet rule refers to the tendency of atoms to have two electrons in their valence shell, which will be the K shell here.