Okonkwo is both representative of the values of his community and a rebel against them at different times in the novel. The obvious point in the novel when Okonkwo's role and position in his society change is when he is exiled by the tribe.
Before his exile, Okonkwo is a leader and a well-respected man of the tribe. He is renowned for his hard work, as noted in his success in growing yams; his physical strength, beginning with his famous wrestling victory over Amalinze the Cat; and his respect and reverence of most of the beliefs and traditions of the tribe. Okonkwo does set himself apart a couple of times, though. For one, he beats his wife during the Week of Peace. The narrator notes that the beating was a result of Okonkwo's "justifiable anger," but the tribe's tradition does not allow for violence of any kind during the Week of Peace. Even more importantly, Okonkwo's actions are called into question when he kills Ikemefuna with his machete. Ikemefuna was destined to be killed by the tribe, as required by the Oracle. However, other respected leaders see Okonkwo's actions as too extreme and as violating the tribe's beliefs about family.
Finally, the act that results in Okonkwo's exile is seen as going against the values and practices of the clan. At the mourning rites for an elder tribesman, Okonkwo fires a gun and accidentally kills one of the dead man's sons. The narrator says that "nothing like this had ever happened." Clearly, Okonkwo's actions do not represent the values of his community. Thus, he is exiled for a span of seven years; his crime as seen as even worse because it was accidental and, so, a female crime. The Umuofia believe in a fundamental difference between masculinity and femininity and as a leader of the tribe, it would be expected that Okonkwo be a pillar of masculinity.
During Okonkwo's exile, missionaries infiltrate the villages, and when Okonkwo returns, he sees it as his duty to reestablish the older traditions of the clan in the face of this new religion (Christianity). However, too many of the people have converted and the missionaries have had too great an influence. When Okonkwo acts violently against these men, whom he considers usurpers, he knows he is not supported by his community and he commits suicide. This is also a shameful practice in his clan.
One could say that over the course of Things Fall Apart, Okonkwo reflects the values, hopes, and fears of his community less and less.