Step 1: Use symmetry of the integral.
We have
\[
k=\int_0^\pi \frac{dx}{1+2\sin^2x}
\]
Since
\[
\sin(\pi-x)=\sin x,
\]
we can write
\[
k=2\int_0^{\pi/2}\frac{dx}{1+2\sin^2x}
\]
Step 2: Use the standard formula.
The standard result is
\[
\int_0^{\pi/2}\frac{dx}{a+b\sin^2x}
=
\frac{\pi}{2\sqrt{a(a+b)}}
\]
Here,
\[
a=1,\quad b=2
\]
So,
\[
\int_0^{\pi/2}\frac{dx}{1+2\sin^2x}
=
\frac{\pi}{2\sqrt{1(1+2)}}
\]
\[
=
\frac{\pi}{2\sqrt{3}}
\]
Therefore,
\[
k=2\cdot \frac{\pi}{2\sqrt{3}}
\]
\[
k=\frac{\pi}{\sqrt{3}}
\]
Step 3: Find the greatest integer less than or equal to \(k\).
Since
\[
\pi\approx 3.14
\]
and
\[
\sqrt{3}\approx 1.732,
\]
we get
\[
k=\frac{\pi}{\sqrt{3}}\approx 1.81
\]
Therefore,
\[
\lfloor k\rfloor=1
\]
Step 4: Final conclusion.
Hence,
\[
\boxed{1}
\]