Wikipedia's article mentions that they "would be gassed themselves" (and that their replacements' first job was often disposing of the previous crew's bodies), but the US Holocaust Memorial Museum's article says they were shot. Given how much they knew about the workings of the camps, it seems likely to me that they understood their days were numbered, and that they'd know or at least suspect when their time came—especially if they were indeed gassed, since they themselves helped operate and maintain the gas chambers. Did they ever try to resist their fate (besides the two revolts at Treblinka and Auschwitz), or did they go willingly to their deaths (which would make sense given all they'd seen and done)?
The Sonderkommando were often well aware of what lay in store for them.
First, some background. "Sonderkommando" was the term assigned to those Jews who were given the "special" job of working in the gas chambers and crematoria. While they were never responsible for any killing, they were in charge of preparing those who were about to be gassed-they were forbidden from telling them what was about to happen, so "preparing" here means ordering people to get undressed, cutting women's hair, etc. After the people were gassed they would remove the corpses, and bury the bodies in mass graves or burn them in the crematoria. In the concentration camps, Sonderkommando were usually kept separate from other prisoners and were often given more food or other "perks" (things like cigarettes). On the flip side, because they knew too much, their life expectancies were a few months, at which point they would be killed and replaced by a new group.
Because we are dealing with human beings, who even under the best of circumstances can have widely different reactions to the same set of circumstances, it is not surprising that different Sonderkommando dealt with their circumstances in widely different ways, ranging from suicide to nonviolent resistance to armed resistance. As you can imagine, being a Sonderkommando was extremely depressing and soul-crushing; just as an example (and not one of the more graphic ones) some would have to cut the hair of family members before they entered the gas chamber without being able to speak to them or touch them in any way other than the haircut. Jewish prisoners who were selected as Sonderkommando often committed suicide-their only means of refusing the job. Others committed suicide during their time working as Sonderkommando, or attempted suicide.
Some engaged in armed resistance which, given the circumstances, might also be categorized as another way of committing suicide. One of the most well-known of the Sonderkommando revolts took place at Auschwitz in October 1944, which you mentioned. This uprising was planned after the Sonderkommando learned that they were scheduled to be killed; they managed to destroy one of the four crematoria before the revolt was suppressed. There were also revolts and escapes organized by the few prisoners who were kept alive in the extermination camps-you mentioned Treblinka, but there was also an uprising in Sobibor in 1943 and a smaller one towards the end of the war in Chelmno.
Nonviolent forms of resistance tended to be the secret documentation of their experiences: what they saw, names of people who were killed, the stories of the destruction of their towns, etc. In the face of their certain deaths as part of the Nazi attempt to erase all evidence of their atrocities, their willingness to risk a more immediate death and testify to what was happening so that it would not, and could not, be erased, is certainly another form of resistance. So, for example, a Sonderkommando managed to get ahold of a camera and secretly took four photos that were then smuggled out; these are some of the only photos depicting the work done by the Sonderkommando, including the disposal of bodies (side note: Art Spiegelman's brilliant graphic novel Maus has panels that recreate two of these photos). Others buried or otherwise hid testimonies; among the most famous manuscripts unearthed after the war were written by five Sonderkommando: Zalman Gradowski, Zalman Lewental, Leib Langfus, Chaim Herman, and Marcel Nadjary (the only survivor among them).
So here you have three different ways that the Sonderkommando responded to their circumstances and what they knew would be their fate: suicide, armed uprising, nonviolent resistance (and, of course, there were those who just did what they had to do and that was that). Whether you want to think of any or all if these as "resistance" or not, I think it's worth emphasizing that life is always more complicated than "resistance" vs. "not resistance," and that is especially true in the horrific, upside-down world of the Holocaust. Whether a person-Sonderkommando or otherwise-was willing to take up arms, or just tried to survive another day amid their terror, or made the choice that surviving another day was not worth it or possible, there are all kinds of ways that Holocaust victims and survivors chose to deal with the systemic stripping of their humanity. It's not about right or wrong or good or bad, but different choices made by-or forced upon-different people.
If you are interested in hearing more about the experiences of individual Sonderkommando, I highly recommend Claude Lanzmann's "Shoah," in which he interviews surviving Sonderkommando. It's obviously not easy subject matter, but it is an important resource for hearing what they went through in their own words.
Sources: I'm on my phone, so don't have the exact links to sources in front of me, but most of this information comes from the United States Holocaust Memorial Museum's encyclopedia, an article from Yad Vashem on Sonderkommando, the Auschwitz Museum, and Lanzmann's Shoah. One of the last surviving Sonderkommando passed away last year, and there was an obituary in the NY Times. PubMed also has an article about suicide in concentration camps that mentions the Sonderkommando. I'm happy to pass along any links later, feel free to ask.
As a complement to u/llama_therapy's answer, I posted a few months ago this answer about David Olere, a former Sonderkommando in Auschwitz who survived the war and testified through his art about his experience.