We study a W -algebra of central charge 2(k − 1)/(k + 2), k = 2, 3, . . . contained in the commutant of a Heisenberg algebra in a simple affine vertex operator algebra L(k, 0) of type A (1) 1 with level k. We calculate the operator product expansions of the W -algebra. We also calculate some singular vectors in the case k ≤ 6 and determine the irreducible modules and Zhu’s algebra. Furthermore, the rationality and the C2cofiniteness are verified for such k.