Krishna represents Brahman or God consciousnesses or consciousness- the self. The birth of Krishna is synonymous with the process of self-realization.
Normally desires and negative thoughts core our consciousness with ignorance. The journey to self-realization involves removal or shedding of this ignorance which can only be done by the eight spiritual principles as described by the Yoga Sutras of Patanjali.
And these are Yama (self control); Niyama (self-discipline), Asanas (bodily postures); Pranayama (control of breath), Pratyahara (withdrawal), Dharana (one pointed), Dhyana (contemplation) and Samadhi (self-realization).
These eight limbs or eight steps signify the journey of eight days after full moon falling on Rakshabandhan, a day celebrated to control one’s lust.
Ignorance is symbolized by a PRISON, which represents darkness; narrow-minded approach (small entry gate) and limitedness to everything (small room). The chain in the prison means the bondages to lust, greed, desires and ego.
Birth of Krishna in the prison means ‘self-realization out of ignorance’. It can only be acquired by adhering to the eight principles of Ashtang Yoga with Tapas (Abhyasa) or hard work. Krishna, born, as the eighth child of Devaki, represents tapas of eight limbs of yoga. The self-realization can only occur after the seven strips are successfully negotiated and the mind is purified in the process.
In the state of Samadhi, there is spontaneous birth of the self. In this state (sama = equal; dhi – intelligence) one controls equality and balances between good and the bad.
The symbolization is that, as Krishna was born, the chains that bound his father fell off; the doors that had been bolted flew open and the prison guards immediately went into sleep. Then Vasudeva, the father took Krishna and went to Gokul, by placing Krishna in a basket and walking across the Yamuna river, where at the same time Yashoda, consort of Nanda, had given birth to a female child.
The ‘chains’ here mean the bondage to the external world and the five senses. A self realized person is free of these bondages. The opening of gates symbolizes control over lust, desire, greed and attachments. Sleeping of the guard symbolizes, that in a self-realized state, one is totally cut off from the world. Everything else perishes and one gets detached.
The thunderstorm, the rain, and the fire, all represent the internal turmoil of uncontrolled desires and hatred. The moment Krishna’s feet touch the turbulent water, everything settles. The spiritual lesson is that by turning inwards and towards one’s pure consciousness any turbulent state of mind can be controlled.
While acquiring all that, one must control the ego and keep the desires inwards and not have egocentric desires. Controlling the ego is depicted as a snake sitting over the basket and guarding Lord Krishna.
The baby girl born at Gokul represents the Mayashakti, which was killed by Kansa (the ego of the body).
Controlling the desires and attachments is easy but controlling the Ego is the most difficult. That is what is represented by the fact that at the time of birth of Krishna, Kansa still remained alive. It took many years for Krishna (self realized state) to kill the ego (Kansa).
Acquiring a state of self-realization should not be the ultimate goal in life. After self-realization, if the ego is not controlled one can misuse one’s spiritual powers. The ultimate aim in life should then be to kill the ego, which is what Krishna ultimately did.