In this paper, the issue of determining an optimal age replacement is explored by incorporating minimal repair, preventive replacement, and corrective replacement into a k-out-of-n system subject to shocks. The k-out-of-n system in question consists of n identical components, and functions if at least k components function. Each shock causes the failure of a random number of components; if at least n-k + 1 components fail, the system fails and implements corrective replacement, otherwise the system is minimally repaired. The system is scheduled to implement preventive replacement before failure at age T or at the complement of a random working cycle, whichever occurs first or last. In order to balance the bias time between preventive replacement and corrective replacement, a replacement bias cost is also taken into account for planning replacement policies. The present paper develops a two-phase maintenance methodology and determines the optimal number of components and preventive replacement age that minimize the expected cost rate functions. For each model, the expected cost rate function is formulated analytically and optimized theoretically, and a numerical example is given to illustrate the applicability of the proposed methodology.