First I guess that the right setting is the case where $G$ is locally compact for its natural topology coming from the topology of $k$. So you need to assume that $k$ is locally compact, i.e. that its residue field is finite.
In Bruhat-Tits theory, by definition, an Iwahori subgroup is a particular case of a parahoric subgroup and such a group is open and compact.
If as an algebraic group over the algebraic closure of $k$, $G$ is simply connected, then the maximal compact subgroups of $G$ are parahoric subgroups. Conversely, a parahoric subgroup is a maximal subgroup of $G$ is and only if it is maximal among parahoric subgroup. In fact, the maximal compact subgroups of $G$ are the parahoric subgroups whose fixators in the Bruhat-Tits buildings are $0$-dimensional facet.
If $G$ is not simply connected, e.g. ${\rm PGL}(n,k)$, then the maximal compact subgroups are not parahoric subgroups in general : they may be bigger. For instance an Iwahori subgroup $I$ of ${\rm PGL}(n,k)$ is formed of those matrices whose representatives in ${\rm GL}(n,k)$ have coefficients in the ring of integers ${\mathfrak o}_k$ and are upper triangular modulo ${\mathfrak p}_k$, the maximal ideal of ${\mathfrak o}_k$. Now the normalizer $\tilde I$ of $I$ in ${\rm GL}(n,k)$ is a maximal compact subgroup which is not a parahoric subgroup. It has the form ${\tilde I} =\langle \Pi\rangle \ltimes I$, where $\Pi$ is the following element : one representative is the endomorphism $f$ of $k^n$, defined on the canonical basis $(e_1 ,...,e_n )$ by $f(e_i )=e_{i-1}$, $i=2,...,n$, $f(e_1 )=\varpi_k e_n $ ($\varpi_k$ is a uniformizer of $k$).