You can boil milk in a kettle, but NOT with the lid on.
1) Boiling milk in ANY kettle:
Boiling milk expands more then faster then boiling water. So the kettle needs to NOT have a lid on, if the lid is off you can boil milk in a kettle, just take the kettle off of the heat right before the milk tries to expand. It is not sure that it would burn the milk, it depends what material the kettle is made of, how thick it is and most important what temperature you use. The higher the temperature is, the higher the risk is that you burn the milk and the thinner the kettle is the higher the risk is that you get high temperature too fast.
NOTE: That you need to guard the milk so you are prepared to take it off the heat right before it expands. The expansion of boiling milk happens very fast and sudden without any warning, you need to be prepared.
REMEMBER to not burn your milk, boil it slowly with not too much heat and not too fast.
2) Boiling milk in ELECTRIC kettle:
If you use an electric kettle you should note that it depends how the electric kettle is made. Example if the kettle is a classic electric kettle with an electric steel bar in it, that will burn the milk for sure and break the kettle, because such kettles heat up to fast and uneven. But if the kettle has an electric heated bottom like some more modern electric castles, then it should work as such a kettle works exactly the same as a normal kettle on a stove. But remember it depends on the temperature itself too.
Here is EXACTLY how you can boil milk on a stove.
https://www.youtube.com/watch?v=55PlWbcT3Yg
And here how to boil milk electric on kettle:
WARNING: If you do NOT know what you are doing, do NOT do it, because it could break the kettle or making it hard to clean up if done wrongly, how ever with that said it does not mean it is impossible to boil milk in an electric kettle without making a big mess or breaking it. The best advice is probably "to not let the milk boil unsupervised" because once it boils over, it will be very fast.
The meaning of "boil" for milk
Although scientifically the word "boil" means "transition from the liquid state to the gas state", milk does no transition from the liquid state to the gas state like water does, but it does it very fast by separating the water from the milk fat, so you need to take it off the heat right before it expands too much and burns. Because the transaction from liquid to gas is not made by the milk, but by the water in the milk and leaving behind the fat on the top of the milk once the milk colds down, there for leaving a thin layer of milk fat on the top of the milk. No worry, that milk fat is perfectly healthy to eat or drink, but you can throw that fat away (that looks like milk skin) if you do not like it.
How you can break the kettle: You can break the kettle if milk gets in the electric parts it will make a short circuit. Also if you burn the milk too hard it will make a smell and a burn mark very hard to wash off. But most dangerous is a "classic electric kettle with an electric steel bar in it" for heating, and that is because hose will burn the milk around the steel bar and break the steel bar contacts because of a circuit that the burned milk will cause. And that without reaching to boil the milk because the steel bar will have more temperature then the kettle itself and that will heat up the milk too much near the steel bar and not enough further way from the hot steel bar. That is why never to use a "classic electric kettle with an electric steel bar in it" to boil milk.