Skip to main content

Posts

Showing posts from May, 2021

Automatically open Chrome developer tools in a new tab

Sometimes we need to check the console or the network transactions of a link that opens up in a new tab. By default, the Chrome developer tools are not opening in a new tab. So, by the time when we hit F12 and open the dev tools, part of the information we needed could be already gone.  There's a setting in dev tools where you can keep the dev tools open automatically in a new tab. To enable that, hit F12 and open up the dev tools. Click on the settings icon in the top right corner. In the Preferences section, scroll down to the bottom. You'll be able to find the option to Auto-open DevTools for popups. Select the checkbox and we're good to go!

How to access a container in Rancher from the command line

How to access a container in Rancher from the command line without SSH If you have deployed an application pod in rancher, sometimes you have to access the running container for various tasks. Maybe, to check some files, monitor logs, run some commands, copy files, etc.  Assume you have an application pod running in Rancher as the following image. Using the Web UI One of the ways to access the container would be using the Rancher UI. If you click on the pod name and then on the next page, you can select Execute Shell from the Pod's context menu. Then it is supposed to bring the command window in the web UI itself. However, this method has its limitations. You cannot copy files to or from the Pod using the web UI itself.  Using Rancher CLI The link to the CLI package can be found in the bottom right corner of the Rancher web UI. Select the CLI client according to your OS and download. I'm using Linux, so I've downloaded the Linux client.  Extract it. tar -xf rancher-linux-am