Shape optimization problem for a generalized Navier-Stokes system with non-trivial boundary conditions is studied. Existence of optimal shapes is established.