I asked this question to my local tech community and the following is a curated list of their replies.
The way that I learned it in the food industry was that ANYTIME you don't know you should say "I don't know, but I'll find out." And then go and ask. Obviously the research time is significantly more in the tech industry, but the principle is the same.
Something that I've said before in an interview was "I've not come across that before, but based on [X related thing], I'd expect that the answer may be [Y way that it works with X thing]"
Yeah, it's a balancing thing. You want to demonstrate an amount of knowledge, without acting like you know things that you don't. Intuition on tech things is a large part of how your learning improves with each new thing.
I'd venture that mid/senior level devs benefit from "I don't know" as well. It is transparency. Don't make the juniors think that you know more than you do. Let them know that they can go learn something and know something that their seniors don't. Titles are about responsibilities and not necessarily ability in EVERY skill. Your Lead/Senior might know nothing about Linux shell scripting or command line usage (like mine on the last project). I was a newer person on the team, and I had more understanding of that stuff than anyone else. In the year that I was there, I helped my lead to learn enough about Linux CLI that he was using tricks that I didn't know existed. We worked together. If your whole team has the exact same skill set then you aren't going to be as great as if everyone has slightly different skills. You can motivate one another and everyone can grow together.
I don't know is an awesome response for a person in leadership who doesn't know and wants to retain their integrity with their team. Faking it when other's careers are at stake is a horrible move. I don't know is also awesome as a new developer who is facing a blocker and has put it in the requisite time to finish it without success. Say you don't know and ask for help!
Honesty holds a lot of value. Saying "I don't know" when you don't know is just fine for almost any scenario. Just don't leave it there, you should follow it up with ", but I can find out!"
You can say "I don't know" without saying "I don't know". This is the power of language in general and English in particular. With so many loan words and homonyms it is particularly tricky to pin down the meaning of single statement. However, you must use this power for good. Personally I will never intentionally lie, but I find Corey's solution to dilemma to be quite elegant. If you are pressed to go further or feel confident on the topic. Then you could add "I would verify that [Y does indeed work as X] by [following this test procedure, looking at this data, etc.]" The point go as deep as you need to and no deeper. Do not lie that you know [Y thing], but give confidence that you can learn it based on [X thing]
If I don't know something during an interview, I have no problem communicating that. However, I don't just leave it at that. I ask more clarifying questions like, could you tell me more about how you use a said product or processes or where could I learn more about it. This indicates a willingness to do research and an openness to learn new things. I tend to always learn something new in interviews.
In the tech industry, there are many opportunities to be deceitful or to be truthful. This is where the phrase "I don't know" really shines. It allows you to clearly state what you don't know and at the same time follow up with everyone favorite line, "But I can find out or learn". You can elegantly state that while you haven't seen this problem before, based on X I think the answer should be Y. You can ask for help from your team. You can ask clarifying questions.
In summary, "I don't know" is the best first part of an answer when you don't know something.