In this paper, the decision problem of equipment replacement in technology upgrading of manufacturing enterprises is studied. In the context of the uncertainty of technology development and market demand, decision makers need to make a choice between continuing to produce with “high cost of old technology” or using “low cost of new technology” in order to minimize the sum of equipment replacement cost and total operating cost. In the case of unknown product market demand time , decision makers need to decide the specific time sequence of the future k replacement only with the information of the per-unit running costs and replacement costs , so as to minimize the total cost while controlling the uncertainty risk. The competitive analysis is used to design an online strategy, so that the gap between the solution of the online strategy and the optimal solution is controlled within a certain ratio, so that even in the worst case, the enterprise can get a relatively satisfactory result.Firstly, the k-equipment replacement model is established in the paper. Then, an online strategy , whose replacement time sequence and the corresponding competitive ratio is obtained by solving a non-linear programming problem . And the optimality of the strategy is further proved. Moreover, the discussion of the special case when shows that the k-equipment replacement model is more general than the previous research. Then, in order to solve the non-linear problem , a numerical solution algorithm is designed by using the idea of binary search, where the solution of is transformed into checking the feasible domains of a series of linear programmings. Finally, the effectiveness of the strategy is verified by numerical simulations, and some general suggestions are also presented for decision makers.The k-equipment replacement model in this paper allows arbitrary replacement times and variation of replacement costs. So it is a quite general model and may have strong practical significance. In the future, factors such as the experience of decision makers, risk appetite and compatibility of old and new technologies can be incorporated into the research of the online replacement decision making.