Recent Posts

Miscelaneous

, , Comment Closed

Replacing # demo.aws_ec2.yml plugin: amazon.aws.aws_ec2 # This sets the region. If empty (the default) default this will include all regions, except possibly # restricted ones like us-gov-west-1 and cn-north-1. regions: – us-east-1 aws_profile: xxx for…

Read Post →

Kubernetes Commands

, , Comment Closed

Pods How many pods? kubectl get pods or kubectl get pods –no-headers | wc -l How many pods are based on a particular label? kubectl get pods –selector key=value or kubectl get pods -l key=value…

Read Post →

Kubernetes Questions

, , Comment Closed

Expose a pod and create a node port service. Create a pod with a label. kubectl run my-app –image=nginx –port=80 –labels=”app=my-app” Create the node port service using a name to match the pod’s label. Otherwise,…

Read Post →

Create GPG for Terraform

, , Comment Closed

Create a PGP key. Select RSA and RSA and a key size of 4096. Enter your name and email address. When you hit O or Okay you’ll be prompted to enter a passphrase. Skip this…

Read Post →

EC2 Service Commands

, , Comment Closed

carrier-gateway aws ec2 describe-carrier-gateways –profile legacy –region us-east-1 –output text client-vpn-endpoint aws ec2 describe-client-vpn-endpoints –profile legacy –region us-east-1 –output text customer-gateway aws ec2 describe-customer-gateways –query CustomerGateways[].CustomerGatewayId –profile legacy –region us-east-1 –output text dhcp-options aws ec2…

Read Post →

AWS CLI

, , Comment Closed

Find Old Snapshots aws ec2 describe-snapshots –region us-east-1 –profile profile –query ‘Snapshots[?StartTime<=`2019-03-01`]’ Retrieve Windows Password aws ec2 get-password-data –instance-id $instance –profile profile –priv-launch-key ~/Desktop/my.pem Refresh an Auto Scaling Group aws autoscaling start-instance-refresh –auto-scaling-group-name my-asg –profile…

Read Post →

AWS Exam Links

, , Comment Closed

Domain 1: Design Resilient Architectures EBS FAQs Whitepaper – AWS Storage Services Overview Lab – Introduction to Amazon Elastic Block Store Amazon EC2 Instance Store SQS FAQs ELB FAQs ELB Documentation EIP FAQs Route 53…

Read Post →

Palindrome

, , Comment Closed

#!/usr/bin/python3 number = input(‘Enter number ‘) step = 0 sum = 0 fwd = int(number) rev = int(number[::-1]) if fwd == rev: print (‘poly’) sum = number else: while fwd != rev: sum = fwd…

Read Post →

Install and Secure KONG

, , Comment Closed

Install Casandra database docker run -d –name kong-database -p 9042:9042 cassandra:3 Install Kong docker run -d –name kong –link kong-database:kong-database -e “KONG_DATABASE=cassandra” -e “KONG_CASSANDRA_CONTACT_POINTS=kong-database” -e “KONG_PG_HOST=kong-database” -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 7946:7946 -p…

Read Post →

Cloudformation Substitution Example

, , 9 Comments

AWSTemplateFormatVersion: 2010-09-09 Description: Create DynamoDB table for Monit Application Parameters:   Environment:     Default: dev     Description: Leveraged for environment tagging.     Type: String     AllowedValues:       – dev       – tst       – qa…

Read Post →