After a devastating defeat at the hands of the Emperor Kaido, Luffy is thrown into the Udon labor camp. He realizes his basic Armament Haki isn't strong enough to pierce Kaido's indestructible scales, so he uses his time in prison—despite being weakened by Sea Prism Stone cuffs—to train his body and willpower.
During the first major battle on Onigashima, Luffy fights against Kaido. He realizes that his standard Armament Haki is ineffective against Kaido’s incredibly tough scales. Kaido explicitly tells Luffy that mere Haki coating is not enough and that he needs to learn to use his Haki at a "higher level." when does luffy learn advanced armament haki