I have rented an apartment, that has open area above the kitchen cabinets where the ducts and electric items are. Any advice what to put up to prevent cats from jumping from counters to top of duct work, then getting into trouble
There's really no point in jeopardizing your pet's well-being or health trying to find stuff to antagonize or repel it.
The answer is in your question. You must change the "open" areas into "closed" or "obstructed access" ones. Block the access to the areas you want undisturbed and unexplored.
The materials are many and varied due to availability and cost of your choice. Paper card stock or cardboard is inexpensive and easily made and positioned. Plastic or wood can be used with a bit more effort (and talent) to look good and is more durable.
Thumb tacks, staples, and painter's tape can be used for the duration of your rental to hold things in place that don't do much damage to the property beyond normal "wear-and-tear."
EDIT: If your cat enjoys the location, provide a limited access (with a box?) where your "room mate" can go to contemplate. You would limit access to the more safe and acceptable place of your choice away from the ducts and cables. A little experimentation will find a compromise you both can accept. Cats love to climb and view their domain. Let 'em.
Most of advices how to keep cats away from something includes either using water, some plants or something that smells bad to cats.
I believe using water guns or something like that wouldn't work in that case, but you probably could try using some citrus smelling substances like citrus air freshener if it is ok for you that your kitchen smells like lemon or orange.
The only thing you would have to keep in mind is that for sure you would have to use this air freshener regularly, perhaps using electronic air freshener with citrus refill might work.