Skip to content

Instantly share code, notes, and snippets.

View komljen's full-sized avatar

Alen Komljen komljen

View GitHub Profile
@sandcastle
sandcastle / redirect-ingress.yml
Created August 27, 2017 02:07
An example of a ingress redirect using kubernetes and nginx `configuration-snippet`
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: redirect-ingress
annotations:
ingress.kubernetes.io/configuration-snippet: |
if ($host ~ ^(.+)\.somedomain\.io$) {
return 301 https://$1.domain.io$request_uri;
}
spec:
@mgoodness
mgoodness / helm-rbac.md
Last active October 30, 2021 17:04
Helm RBAC setup for K8s v1.6+ (tested on minikube)
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
@philips
philips / users.md
Last active April 5, 2023 14:17
Kubernetes Third-Party Resource Users
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active September 7, 2024 16:25
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@leonardofed
leonardofed / README.md
Last active June 5, 2025 20:43
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@liamdawson
liamdawson / token.sls
Last active February 7, 2020 19:32
Set a grain from an api call on a minion
#!py
# The following statefile uses Python to set a grain ('sample-token') to
# a value pulled from a HTTP call. The call will not be repeated if the
# grain is already set.
from salt.utils.http import query
import json
def run():
@cloudnull
cloudnull / neutron-vpnaas-fwaas-lbaas-configSetup.rst
Last active September 4, 2019 08:53
Setup Openstack Havana with Neutron using VPNaaS (VPN as a Service), FWaaS (Firewall as a Service), LBaaS (Load Balancer as a Service).

Installing Openstack VPNaaS, LBaaS, and FWaaS

This brief overview assumes that Openstack Havana has been installed and setup with Neutron Networking. If you have not already done this, you could use "https://github.com/cloudnull/rcbops_allinone_inone" or devstack to setup a dev box and then perform the following actions.


  • install "openswan":

    # (apt-get install openswan neutron-plugin-vpn-agent) || (yum install openswan openstack-neutron-vpn-agent && chkconfig neutron-vpn-agent on)
    
@rgbkrk
rgbkrk / hubdecrypt.sh
Last active April 6, 2022 02:55
Encrypt a (short) file using someone's public key from github
#!/usr/bin/env bash
# HubCrypt
# ========
#
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl +
# your SSH keys). It needs the private key that matches your last public key
# listed at github.com/<user>.keys
#
@dduvnjak
dduvnjak / awesome_prompt.md
Last active December 16, 2015 11:39
Awesome prompt for bash and fish shell

To make you prompt look like this:

Prompt screenshot

Add this to your ~/.bash_profile

export PS1="\[$(tput setaf 6)\]\u\[$(tput sgr0)\]@\[$(tput setaf 6)\]\h\[$(tput setaf 3)\] \w\n\[$(tput sgr0)\]> "

Or this to your ~/.config/fish/config.fish (create it if it's not there):

@dduvnjak
dduvnjak / README.md
Last active May 6, 2025 19:35
A Ruby script which spins up a new Ubuntu instance on EC2 and installs java, ant, python and perl on it (all done via Fog). It reads parameters from the config file, but they're overwritable with passed arguments. Can also terminate instances and attach EBS volumes.

Usage:

ruby aws.rb launch [--region region --aws-key aws_key --aws-secret aws_secret --security-group security_group --key-pair key_pair --key-path key_path --ami-id ami_id--flavor-id flavor_id ]  

ruby aws.rb terminate [--region region --aws-key aws_key --aws-secret aws_secret] --instance-id instance_id  

ruby aws.rb attach [--region region --aws-key aws_key --aws-secret aws_secret] --instance-id instance_id --volume-id volume_id
No arguments provided