Heat coconut oil in a large pot over medium heat. Add onions, garlic, and ginger and cook until softened, about 3-4 minutes.
Add curry powder, cayenne, turmeric, black pepper, and cinnamon stick. Sauté for 1-2 minutes until fragrant, being careful not to burn.
Stir in tamarind concentrate, salt, sugar, and jackfruit pieces, coating everything well with the spice mixture.
Pour in coconut milk and add curry leaves and pandan leaf if using. Bring to a gentle simmer.
Cover and cook on low heat for 1-2 hours, until jackfruit is tender and flavors have melded.
Adjust salt and seasoning to taste before serving.