As with any international travel, it is advisable to only travel if you have six months of validity
left on your passport.
Technically speaking, you can still apply for a Canadian eTA if your travel dates are within the
validity of your passport but you are advised to check the entry requirements for any country that
you are planning to travel to. This should include to check whether your expiring passport will be
accepted, or if there is not long enough left of validity then you will need to apply for a new
passport before travelling.