Relation between CDS spreads and Ke and Kd

Guys

How can we establish a relationship between CDS spreads and Cost of Debt/ Bond yields and Cost of equity?