This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All nodes | |
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf | |
sudo sysctl -p | |
Master Node | |
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml | |
kubectl get nodes | |
Check if all three Flannel Pods are running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get update | |
sudo apt-get install -y kubelet=1.12.2-00 kubeadm=1.12.2-00 kubectl=1.12.2-00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 attach-internet-gateway --vpc-id "vpc-0e5bxxxxxxxxx" --internet-gateway-id "igw-03yyyyyyyyyy" --region us-east-2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#top of the file | |
sed -i '1s/^/your text\n/' file | |
#End of the file | |
sed -i "2i192.241.xx.xx venus.example.com radious" /etc/hosts | |
or | |
echo "192.241.xx.xx venus.example.com radious" >> /etc/hosts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attach IGW to a VPC | |
aws ec2 attach-internet-gateway --vpc-id "vpc-f3cbfe8a" --internet-gateway-id "igw-6a631b0c" --region us-west-2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import json | |
import boto3 | |
import urllib.request | |
print('Loading function') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//RunCommandlambda.java Source Code | |
package net.anandus.captureloglamda; | |
import com.amazonaws.services.lambda.runtime.Context; | |
import com.amazonaws.services.lambda.runtime.RequestHandler; | |
import java.util.List; | |
public class RunCommandLambda implements RequestHandler<Request, Response> { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# creating launch config from running instance | |
aws autoscaling create-launch-configuration --launch-configuration-name web-demo-launch-config --instance-id i-a8exxxxxx | |
# Creating ASG from running instance | |
aws autoscaling create-auto-scaling-group --auto-scaling-group-name web-demo-asg --instance-id i-7f12e649 --min-size 1 --max-size 2 --desired-capacity 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS - CLI Link https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html | |
Install Python using msi | |
# Check python version | |
python -version | |
# Check pip version | |
pip -version | |
# install aws cli |