Let $H$ be a digraph possibly with loops, $D$ a digraph without loops, and $\rho : A(D) \rightarrow V(H)$ a coloring of $A(D)$ ($D$ is said to be an $H$-colored digraph). If $W=(x_{0}, \ldots , x_{n})$ is a walk in $D$, and $i \in \{ 0, \ldots , n-1 \}$, we say that there is an obstruction on $x_{i}$ whenever $(\rho(x_{i-1}, x_{i}), \rho (x_{i}, x_{i+1})) \notin A(H)$ (when $x_{0} = x_{n}$ the indices are taken modulo $n$). We denote by $O_{H}(W)$ the set $\{ i \in \{0, \ldots , n-1 \} :$ there is an obstruction on $x_{i} \}$. The $H$-length of $W$, denoted by $l_{H}(W)$, is defined by $|O_{H}(W)|+1$ whenever $x_{0} \neq x_{n}$, or $|O_{H}(W)|$ in other case. A $(k, H)$-kernel of an $H$-colored digraph $D$ ($k \geq 2$) is a subset of vertices of $D$, say $S$, such that, for every pair of different vertices in $S$, every path between them has $H$-length at least $k$, and for every vertex $x \in V(D) \setminus S$ there exists an $xS$-path with $H$-length at most $k-1$. This concept widely generalize previous nice concepts as kernel, $k$-kernel, kernel by monochromatic paths, kernel by properly colored paths, and $H$-kernel. In this paper, we will study the existence of $(k,H)$-kernels in interesting classes of digraphs, called nearly tournaments, which have been large and widely studied due its applications and theoretical results. We will show several conditions that guarantee the existence of $(k,H)$-kernel in tournaments, $r$-transitive digraphs, $r$-quasi-transitive digraphs, multipartite tournaments, and local tournaments.