Sounds okay, but be careful about it. That much difference in CR, you could easily accidentally kill a PC if you hit them even once.
Stuff to watch out for:
1) Inescapable grapple. If the kraken chooses to grapple a PC, make sure it's a strong one, to give them a fighting chance of getting out of it. The kraken is a grapple BEAST. +44 on grapple checks, and he deals constrict damage. A PC would need to be able to get a 54 result on a grapple check to stand an even chance. You might want to give them alternative ways to conduct the grapple (escape artist can give you a better chance, and stuff like grease or slicked armor, too), or just have them sever the tentacles/arms.
2) Lots of attacks. 9 attacks on a full attack, most of which will RUIN mooks. It's arms are the weakest, but there's 6 of 'em, and each one deals about 9 points of damage, and then can constrict (and there'd be little reason for the kraken to NOT constrict of those 9 points didn't off the target).
3) SLA's of Control Weather and Control Winds. Sinking ships with windstorms and lightning is something a lot of krakens probably make a habit out of. Either give him a reason NOT to do it, or the encounter might be more about surviving the sinking ship rather than fighting the giant squid.
...and a few potential solutions....
1) Make the encounter more about the arms than about the fight. Those arms have about 10 hp apiece, something most 8th level characters can handle. If a character has Improved Sunder, this is a perfect chance for that ability to shine, since everyone else will probably be hit in the AoO from attacking the tentacle. It's also cool to write-off grappling tentacles as unable to make AoO's, so to give some characters without that feat a good chance to help out. The Kraken also has an impressive BAB, compared to the PC's, and gets a +12 size bonus on that opposed roll, so you'll need a PC who can possibly get attack rolls in the 40's.
2) "Focus all your power on me!" If the party buffs the local heavy fighter out the wazoo, she stands the best chance of taking any of this on. A couple of well-placed Strength and Size boosters and she could hit the critter and deal damage enough to make them a threat.
3) It's not a monster, it's an obstacle. This is a bit of thinking outside the box: instead of having them fight the kraken, make it a single challenge. You're already thinking about the ballista, so the most logical course might be to make it about reaching and firing the ballista: you need a Reflex save to cross the deck without getting wallopped by the flailing arms (which aren't really targeting you). Failure means you are subject to an attack, success means you avoid it entirely. If you reach the ballista, you need to aim and fire. It takes one round and a DC 20 Concentration check to get the focus you need to aim the bolt true. Once there, you make an attack roll against the kraken, and if you hit, the kraken will retreat with a ballista bolt in it's eye. If you miss, you're going to be the target! Keep in mind the effects of high winds and rain on the ranged attack, making it all the more difficult.
The last alternative is probably what I would go with. It favors the agile characters (a DC 24-ish Reflex save to cross the ship without getting attacked!), the spellcasters (because who else puts point into Concentration?
), and finally the fighters (a high attack roll is needed to actually hit the kraken in the rain). The clerics help out by recovering those who fail at any step -- because anyone who is targeted by the kraken is going to need some healin' pretty badly.
So there's my take.