For a fixed integer $k \geq 1$ and real $s>0$ I want to rework the partial sums
$$\sum_{\substack{ n \leq x \\ \text{gcd}(k,n) = 1 }} \frac{1}{n^s}$$
in such a way that I can find an asymptotic formula for them. I've tried to express the $\text{gcd}(k,n) = 1$ condition in various ways involving $\mu$; for example, $$\sum_{\substack{ n \leq x \\ \text{gcd}(k,n) = 1 }} \frac{1}{n^s} = \sum_{n\leq x}\frac{1}{n^s}\sum_{d | \text{gcd}(k,n)} \mu(d),$$
since $\sum_{d | \text{gcd}(k,n)} \mu(d)$ is equal to 1 if $k$ and $n$ are relatively prime, and 0 if they aren't. But I can't see where to go from here; the difficulty seems to be that $k$ isn't an index of the summation.
(This is exercise 3.12 in Apostol's Introduction to Analytic Number Theory.)
You have the right start. You might have the idea by now that your initial goal will be to reverse the order of summation. I will let $(k,n)$ denote $\gcd(k,n)$.
Claim: $\displaystyle \sum_{\substack{n \leq x \\ (n,k) = 1}} f(n) = \sum_{d \mid k} \mu(d) \sum_{l \leq x/d} f(ld)$
Proof: As you've noticed, $$ \sum_{\substack{n \leq x \\ (n,k) = 1}} f(n) = \sum_{n \leq x} \sum_{d \mid (n,k)} \mu(d) f(n).$$
Now we want to reverse the order of summation. For each divisor $d$ of $k$, we sum over multiples of $d$ that are less than or equal to $x$. So thinking of $n = ld$, we want to include only those $l$ such that $ld \leq x$, or rather $l \leq x/d$. Putting these together allows us to complete the reversal, getting $$ \sum_{d \mid k} \mu(d) \sum_{l \leq x/d} f(ld),$$ and proving the claim. $\diamondsuit$
For us, this means that $$\sum_{\substack{n \leq x \\ (n,k) = 1}} \frac{1}{n^s} = \sum_{d \mid k} \frac{\mu(d)}{d^s} \sum_{l \leq x/d} \frac{1}{l^s}.$$
Now the analysis is somewhat straightforward. When $s = 1$, you can use your knowledge of $\displaystyle \sum_{n \leq y} \frac{1}{n}$ to get the desired asymptotic $$ \frac{\varphi(k)}{k}(\log x + \gamma) + C_k + O\left( \tfrac{1}{x} \right),$$ where $\gamma$ is the Euler-Mascheroni constant and $C_k$ is a constant depending on $k$ which can be given explicitly.
When $s \neq 1$, then you use your knowledge of $\displaystyle \sum_{n \leq y} \frac{1}{n^s}$ to produce a similar asymptotic.