You can only upgrade using United miles if you fly using a Lufthansa flight number (not the United codeshare number). You need to get a paper upgrade certificate from United. There is kind of a catch 22. United won't issue the upgrade certificate until the upgrade is confirmed. Often the upgrade won't confirm prior to the flight. My travel agent gets United to send me the upgrade coupon while we are waiting 10 days or so for the confirmation. In the absense of advance confirmation, Lufthansa is good about taking the coupon for an upgrade at the gate.