Obeying the Lord's instructions is not the same as attempting to earn our salvation by works. On one hand, Jesus instructs us to take up our cross and follow Him (Matthew 16:24). But on the other hand, we are repeatedly warned against the attempt to earn salvation by obeying the letter of the law (Ephesians 2:8-9).
The difference between earning our own way and resting fully on the grace given us through Jesus comes down to love. When our motivation in disciplining our bodies comes from the desire that Christ be glorified in our bodies, we obey in order to know more of Him. And because He is beautiful and perfect, the more we know of Him, the more we love Him.
We do not obey in order to save ourselves (that work has already been accomplished at the Cross), we obey because we love Jesus and want to know more of Him. This is the difference between legalism and freedom. When we become enslaved by self-imposed rules, we are motivated by fear that if we stop following our rules, then bad things will happen to us. When we obey in order to know more of Christ, we follow the rule of love.
Our daily challenge is to feed faith and not fear: faith that Jesus has saved us and we do not need to save ourselves, faith in the promises He has given, faith that self-denial is worth light and momentary discomfort because it enables us to know more of our Savior.
For it is by grace you have been saved, through faith—and this is not from yourselves, it is the gift of God— not by works, so that no one can boast.
Ephesians 2:8-9 NIV