During the judgement day when the world is being shattered what will happen to the kaba? Would the people inside the kaba be saved by Allah?
The kaba will be destroyed as well. If there were people inside it, they will die. After that, they will be resurrected again. The following verses talk about this event:
28:83 (As for) that future abode, We assign it to those who have no desire to exalt themselves in the earth nor to make mischief and the good end is for those who guard (against evil)
28:84 Whoever brings good, he shall have better than it, and whoever brings evil, those who do evil shall not be rewarded (for) aught except what they did.
28:85 Most surely He Who has made the Quran binding on you will bring you back to the destination. Say: My Lord knows best him who has brought the guidance and him who is in manifest error.
28:86 And you did not expect that the Book would be inspired to you, but it is a mercy from your Lord, therefore be not a backer-up of the unbelievers.
28:87 And let them not turn you aside from the communications of Allah after they have been revealed to you, and call (men) to your Lord and be not of the polytheists.
28:88 And call not with Allah any other god; there is no god but He, every thing is perishable but He; His is the judgment, and to Him you shall be brought back.