Skip to content

Instantly share code, notes, and snippets.

View harshal-shah's full-sized avatar

Harshal Shah harshal-shah

View GitHub Profile
@harshal-shah
harshal-shah / kops-spec.yaml
Created December 10, 2018 13:50
kops cluster spec
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
creationTimestamp: null
name: staging.some-company.io
spec:
additionalPolicies:
master: |
[
{
@harshal-shah
harshal-shah / buffer.log
Created November 29, 2018 10:53
Buffer file for fluentd character conversion issue
��_tag�kubelet�timestamp�A����I��_SYSLOG_FACILITY�3�_PRIORITY�6�_UID�0�_GID�0�_SYSTEMD_SLICE� system.slice�_BOOT_ID� 30b507131fce43d985c800d1af2b4023� _MACHINE_ID� 4a3bad6bb9884e7ab754e21cc2651699�_CAP_EFFECTIVE�
3fffffffff�
_TRANSPORT�stdout� _HOSTNAME�ip-172-23-59-210�_SYSLOG_IDENTIFIER�kubelet�_PID�7696�_COMM�kubelet�_EXE�/usr/local/bin/kubelet�_CMDLINE��/usr/local/bin/kubelet --allow-privileged=true --cgroup-root=/ --cloud-provider=aws --cluster-dns=100.64.0.10 --cluster-domain=cluster.local --enable-custom-metrics=true --enable-debugging-handlers=true --eviction-hard=memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%,imagefs.available<10%,imagefs.inodesFree<5% --feature-gates=CustomPodDNS=true,ExperimentalCriticalPodAnnotation=true --hostname-override=ip-172-23-59-210.eu-west-1.compute.internal --kubeconfig=/var/lib/kubelet/kubeconfig --max-pods=55 --network-plugin=cni --node-labels=helm=true,kubernetes.io/role=node,node-role.kubernetes.io/node= --non-masquerade-cidr=1
@harshal-shah
harshal-shah / kops_issue_syslog.log
Last active July 5, 2018 16:08
syslog captured during k8s master outage
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.252986 8583 aws_volume.go:72] AWS API Request: ec2metadata/GetMetadata
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.253994 8583 aws_volume.go:72] AWS API Request: ec2metadata/GetMetadata
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.254718 8583 aws_volume.go:72] AWS API Request: ec2metadata/GetMetadata
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.257659 8583 aws_volume.go:72] AWS API Request: ec2/DescribeInstances
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.486326 8583 main.go:187] cluster-id: production.mydomain.io
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.486677 8583 dnscontroller.go:101] starting DNS controller
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.486760 8583 dnscache.go:75] querying all DNS zones (no cached results)
Jul 5 13:22:56 ip-172-24-102-238 docker[8538]: I0705 13:22:56.486917 8583 route53.go:53
@harshal-shah
harshal-shah / GermanConsulateMumbai.md
Created June 6, 2018 02:06
Tips for visiting German Consulate office in Mumbai

The German consulate office in Mumbai has recently moved to a new building and they have some quirky rules which can throw off anyone who does not know them. I faced problems due to these rules and was helped by some kind souls. This article should help people prepare for their consulate visit and avoid facing problems which I did.

Rules

  • Backpacks are not allowed. They allow you to carry your paperwork in files/folders/envelopes but backpacks are a strict NO. If you have a backpack you are simply asked to leave and make "arrangement" for keeping your backpack elsewhere. This can get quite harrowing, but some tips below can help.
  • Mobile phones are not allowed. Again, if you are having a mobile phone on you, you need to make "arrangement" to keep it outside and return without mobile phone. If you are not well prepared, "arrangements" mentioned above can take significant time leading to potential loss of appointment. Tips mentioned below should help in avoiding such hassles.

Driving and Parking

If

@harshal-shah
harshal-shah / k8s_read_only_user.md
Last active May 25, 2018 05:12
ReadOnly user for k8s 1.8 and over

Steps for RO user

Generate RSA key

openssl genrsa -out ./kops_ro.key 2048

export CLIENT_KEY_PATH=${PWD}/kops_ro.key
export CLIENT_CSR_PATH=${PWD}/kops_ro.csr
export NAME=kops-qa
@harshal-shah
harshal-shah / guestbook_np.yaml
Created September 1, 2017 12:50
Kubernetes GuestBook App with NodePort
apiVersion: v1
kind: Service
metadata:
name: redis-master
labels:
app: redis
tier: backend
role: master
spec:
ports: