Skip to content

Instantly share code, notes, and snippets.

@octate
octate / index.html
Created August 5, 2020 06:15
Space walk
<div class="container">
<div class="space">
<div class="moon">
</div>
<div class="astronaut">
<div class="head"> </div>
<div class="neck"> </div>
<div class="body">
<div class="emblem"> </div>
</div>
@octate
octate / kubernetes-on-aws
Created February 4, 2020 06:11
Create k8s cluster on amazon ec2 using kops
#!/bin/bash
# Prerequisites (macOS):
# - aws cli => to create AWS resources
# => pip install --upgrade --user awscli
# => aws configure
# - jq => to parse JSON results returned by the AWS CLI
# => brew install jq
{
"platform": "",
"title": "feed",
"slug": "feed",
"type": "custom",
"tags": "",
"application": "",
"description": "Fynd feed page",
"publish": "",
"content": [
@octate
octate / pods-list.yaml
Last active March 16, 2018 16:27
get pods -o wide
[ec2-user@ip-172-31-35-145 ~]$ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE
es-0 1/1 Running 0 1d 100.96.2.34 ip-172-20-52-48.us-east-2.compute.internal
es-1 1/1 Running 0 1d 100.96.1.21 ip-172-20-62-30.us-east-2.compute.internal
es-2 1/1 Running 0 1d 100.96.2.35 ip-172-20-64-53.us-east-2.compute.internal
es-3 1/1 Running 0 2m 100.96.1.22 ip-172-20-67-30.us-east-2.compute.internal
es-4 1/1 Running 0 4m 100.96.2.37 ip-172-20-87-68.us-east-2.compute.internal
@octate
octate / elasticsearch-statefulset.yaml
Last active January 16, 2023 07:22
Explaining elasticsearch stateful config file
apiVersion: apps/v1beta1 # API version of kubernetes in which `StatefulSet` is available. For Kubernetes 1.8.7 its apps/v1beta1
kind: StatefulSet # Type of resource that we are creating
metadata: # Holds metadata for this resource
name: es # Name of this resource
labels: # Extra metadata goes inside labels. It is for stateful resource
component: elasticsearch # Just a metadata we are adding
spec: # Holds specification of this resource
replicas: 3 # Responsible for maintaining the given number of replicas
serviceName: elasticsearch # Name of service, required by statefulset
template: # Template holds the spec of the pod that will be created and maintained by statefulset