A comprehensive guide to using kubectl, with advanced usage examples and filtering techniques using grep and awk.
- Get all resources in the cluster:
| import pandas as pd | |
| import argparse | |
| def merge_data(mannequin_df, users_df, slug): | |
| # Merge the dataframes on 'mannequin-user' and 'login' | |
| merged_df = pd.merge(mannequin_df, users_df, left_on='mannequin-user', right_on='login', how='inner') | |
| # Ensure that we only apply the transformation on non-null 'name' values | |
| merged_df['name'] = merged_df['name'].apply(lambda x: f"{x.replace(' ', '-').lower()}_{slug}" if isinstance(x, str) else '') |
Your organization may have Okta set up as a SAML Connection to an AWS Account. As a result, you may find yourself needing to download an S3 object from within your CLI.
First things first include downloading the following:
To install the above, will be dependent on your OS such as Windows, or Mac.
| #!/bin/bash | |
| # ============================================= | |
| # Created by: Richard Barrett | |
| # Date Created: 11/09/2021 | |
| # Purpose: Migrate OpenStack L3 Agents | |
| # Company: Charter Spectrum | |
| # ============================================= | |
| # Documentation: | |
| # ======================================================================================== |
| #!/bin/bash | |
| # ============================================= | |
| # Created by: Richard Barrett | |
| # Date Created: 10/23/2021 | |
| # Purpose: Make Docker Run Command | |
| # Company: Mirantis | |
| # ============================================= | |
| # Documentation: | |
| # ======================================================================================== |
| {* Originally: https://gist.github.com/efrecon/8ce9c75d518b6eb863f667442d7bc679 *} | |
| {* Author: https://gist.github.com/efrecon *} | |
| {* Use: For Personal Use Alongside Another Gist for Interactive Prompt on Pull Run Command *} | |
| docker run \ | |
| --name {{printf "%q" .Name}} \ | |
| {{- with .HostConfig}} | |
| {{- if .Privileged}} | |
| --privileged \ | |
| {{- end}} | |
| {{- if .AutoRemove}} |
| #!/bin/bash | |
| # ============================================= | |
| # Created by: Richard Barrett | |
| # Date Created: 10/20/2021 | |
| # Purpose: Auto MKE Config TOML Download | |
| # Company: Mirantis | |
| # ============================================= | |
| # Documentation: | |
| # ======================================================================================== |
| #!/bin/bash | |
| # =============================================== | |
| # Created by: Richard Barrett | |
| # Date Created: 10/04/2021 | |
| # Purpose: Interactive MSR Reconfigure | |
| # Company: Mirantis | |
| # =============================================== | |
| # System Variables | |
| # ================ |
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
| #!/bin/bash | |
| # =============================================== | |
| # Created by: Richard Barrett | |
| # Date Created: 06/23/2021 | |
| # Purpose: Mirantis MKE XFS Config Check | |
| # Company: Mirantis | |
| # =============================================== | |
| ROLE = "$(sudo docker node inspect self | jq '.[] .Spec.Role')" | |
| MANAGER = "$(echo '"manager"')" |