You don’t say which keyboard you have. Have you read the manual? On most keyboards you can select many functions to be controlled by pedal, - pitch bend, style start/stop, sustain, volume and others. Just access the menu and go to the pedal control selection. On many keyboards you can do this easily by pressing the pedal while hitting the direct access button. For pitch bend control you would need an expression type pedal - like you use for volume control - rather than a simple switch type pedal, because it’s not an on/off function.
Mike