The key to keeping yourself relevant is understanding the big picture, and learning stuff that is outside your area of expertise. For example, I started as a network engineer, but got into UNIX because I wanted to know how the provisioning systems worked that ran on Sun boxes. Then I moved into UNIX sysadmin work, and I found that I could run circles around most sysadmins because I understood how the network functioned and could troubleshoot beyond a single box (hint: it's (almost) always a DNS problem... :) After you've stood up a few complete datacenters or soup to nuts web infrastructure for a few medium sized companies, you move into architecture, but you need to keep yourself relevant and current. Here is a rough timeline of what I was focused on:
1990-1994 - Novell Netware, WordPerfect Office (became Novell Groupwise) 1994-1999 - Network engineering at an ISP, got into UNIX. 1999-2005 - Solaris system administration (2001-2002 was rough and was out of work for about 9 months during the dot com crash) 2005-2008 - Linux system administration - got into storage administration and became a SAN/storage architect. Started going really deep on configuration management, CFengine, later Chef/Puppet - automate all the things! 2009-2013 - VMware and private cloud - my skills as a storage architect led me to a natural role as a VMware architect, and automated provisioning infrastructure as a service. 2013-now - public cloud/AWS.
Keep reinventing yourself, and you have to really enjoy learning new things, or you won't last long in this industry. I think that's probably true of any job, though, honestly. Would you want to see a doctor that hadn't learned anything since he left medical school? I sure wouldn't...