Place pineapple, jalapeño slices, garlic cloves, and other spices into a mason jar. Pour equal parts water and vinegar and a pinch of salt over after bringing up to boil. Seal the jar with a cap and let it come to room temperature.