Here is an example. Choose an uncountable algebraically independent set $S\subset \mathbb{R}$, and let $k=\mathbb{Q}(S)$. For each $x\in S$, choose a sequence $(q_n(x))$ of rationals converging to $x$. Given any $y\in k$, write $y=f(x_1,\dots,x_m)$ for some rational function $f$ and some $x_i\in S$ and define $q_n(y)=f(q_n(x_1),\dots,q_n(x_m))$. Note that $q_n(y)$ may not be defined since the denominator of $f$ could vanish, but for fixed $y$ it is defined for all sufficiently large $n$ since $q_n(x_i)$ must converge to $x_i$.
Now let $A$ be the set of all sequences of rationals $(a_n)$ such that for some $y\in k$, $a_n=q_n(y)$ for sufficiently large $n$. This set has the same cardinality as $S$, and forms a ring under pointwise addition and multiplication. There is an epimorphism $\varphi:A\to k$ that sends any sequence to its limit. The kernel of $\varphi$ is a countable maximal ideal of $A$. Explicitly, $\ker(\varphi)$ is the set of sequences of rationals that are eventually $0$. This ideal is not finitely generated, and so in particular cannot be generated by an idempotent.
Note that this construction can give an example having any cardinality up to the continuum. The role of the real numbers in this construction is only to guarantee that $q_n(y)$ is always defined for sufficiently large $n$; you might think you can get $A$ to be arbitrarily large by a slightly more clever construction. It turns out that this is impossible: there are no examples for which either the ring has cardinality larger than the continuum or the maximal ideal is finitely generated. Let $A$ be an uncountable ring and let $I\subset A$ be a countable maximal ideal. Then $A$ acts on $I$ by multiplication, giving a homomorphim $\alpha:A\to End_A(I)$. If either $A$ is larger than the continuum or $I$ is finitely generated, $A$ will have larger cardinality than $End_A(I)$. In either case, we can conclude that the kernel of $\alpha$ is uncountable.
In particular, we can find some $k\in \ker(\alpha)\setminus I$. Now by maximality of $I$, there is some $a\in A$ and $i\in I$ such that $ak=1-i$. But then for any $j\in I$, $0=akj=j-ij$. This implies $i$ is an idempotent generator of $I$. (This argument assumes $A$ is commutative; see Jeremy Rickard's answer for a variant that works for noncommutative rings as well.)