What did Kenya South Africa and Kenya do to gain independence?

South Africa ended apartheid and gained freedom.