[step:Prove that finiteness of $k_K$ and completeness imply compactness of $\mathcal{O}_K$ via a diagonal argument]Assume $K$ is a local field, so $k_K$ is finite (say $|k_K| = q$) and $K$ is complete. We show $\mathcal{O}_K$ is sequentially compact, which implies compactness since $\mathcal{O}_K$ is a metric space.
[claim:Each quotient $\mathcal{O}_K/\pi^n \mathcal{O}_K$ is finite of order $q^n$]
For $n = 1$, $\mathcal{O}_K/\pi \mathcal{O}_K = k_K$ has $q$ elements by hypothesis. For the inductive step, consider the short exact sequence of abelian groups
\begin{align*}
0 \to \pi^n \mathcal{O}_K / \pi^{n+1} \mathcal{O}_K \to \mathcal{O}_K / \pi^{n+1} \mathcal{O}_K \to \mathcal{O}_K / \pi^n \mathcal{O}_K \to 0.
\end{align*}
The map $\mathcal{O}_K/\pi \mathcal{O}_K \to \pi^n \mathcal{O}_K / \pi^{n+1} \mathcal{O}_K$ sending $\bar{a} \mapsto \pi^n a + \pi^{n+1}\mathcal{O}_K$ is a well-defined bijection (surjectivity: every element of $\pi^n \mathcal{O}_K$ has the form $\pi^n a$; injectivity: $\pi^n a \in \pi^{n+1}\mathcal{O}_K$ iff $a \in \pi \mathcal{O}_K$). So $|\pi^n \mathcal{O}_K / \pi^{n+1} \mathcal{O}_K| = q$, and $|\mathcal{O}_K / \pi^{n+1}\mathcal{O}_K| = q \cdot |\mathcal{O}_K/\pi^n \mathcal{O}_K| = q^{n+1}$.
[/claim]
[proof]
Proved inline above.
[/proof]
Let $(x_i)_{i \geq 1}$ be a sequence in $\mathcal{O}_K$. Since $\mathcal{O}_K/\pi \mathcal{O}_K$ is finite, there exist infinitely many indices $i$ for which $x_i$ falls in the same coset modulo $\pi$. Extract a subsequence $(x_{1,i})_{i \geq 1}$ that is constant modulo $\pi \mathcal{O}_K$.
Repeat: since $\mathcal{O}_K/\pi^2 \mathcal{O}_K$ is finite, pass to a further subsequence $(x_{2,i})_{i \geq 1}$ of $(x_{1,i})$ that is constant modulo $\pi^2 \mathcal{O}_K$. Continuing, for each $n \geq 1$, extract $(x_{n,i})_{i \geq 1}$ as a subsequence of $(x_{n-1,i})$ that is constant modulo $\pi^n \mathcal{O}_K$.
Form the diagonal subsequence $y_j := x_{j,j}$ for $j \geq 1$. For any $n \geq 1$ and $j, j' \geq n$, the terms $y_j = x_{j,j}$ and $y_{j'} = x_{j',j'}$ are both members of the subsequence $(x_{n,i})_{i \geq 1}$ (since for $j \geq n$, $x_{j,j}$ appears in the $n$-th subsequence). Hence $y_j \equiv y_{j'} \pmod{\pi^n}$, giving $|y_j - y_{j'}| \leq |\pi|^n$. Since $|\pi|^n \to 0$ as $n \to \infty$, the sequence $(y_j)$ is Cauchy. By completeness of $K$, it converges to some $y \in K$. Since $|y_j| \leq 1$ for all $j$, we have $|y| \leq 1$, so $y \in \mathcal{O}_K$.[/step]