Take a wire brush and scrub the rust to the bare metal. Then coat with something like Rustoleum No Rust Rust Converter, let it cure overnight. Then cover with Rustoleum No Rust paint.
These frames, I've learned, have to be maintained just like the pool itself has to be maintained. Having seen horror stories on here re: rusting frames, I coated the insides of my frame elements with Rustoleum before I ever set it up.