Skip to content

Instantly share code, notes, and snippets.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
spec:
backend:
serviceName: testsvc
servicePort: 80
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: foo.bar.com
http:
@d-nishi
d-nishi / ingress-tls-secret.yaml
Last active September 27, 2018 18:02
TLS Secret and Ingress
apiVersion: v1
data:
tls.crt: base64 encoded cert
tls.key: base64 encoded key
kind: Secret
metadata:
name: testsecret
namespace: default
type: Opaque
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
@d-nishi
d-nishi / index.ts
Last active April 15, 2023 23:15
EKS RBAC - verbose index.ts
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as eks from "@pulumi/eks";
import * as k8s from "@pulumi/kubernetes";
/*
* 1) Single step deployment three IAM Roles
*/
// Administrator AWS IAM clusterAdminRole with full access to all AWS resources
@d-nishi
d-nishi / index.ts
Last active May 19, 2020 18:56
EKS RBAC simplified
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as eks from "@pulumi/eks";
import * as k8s from "@pulumi/kubernetes";
/*
* 1) Single step deployment of three IAM Roles
*/
function createIAMRole(name: string): aws.iam.Role {
@d-nishi
d-nishi / create-service-role.json
Last active May 22, 2019 16:05
CodeBuild Service Role
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {
"Service": "codebuild.amazonaws.com"
},
"Action": [
"sts:AssumeRole",
"ssm:GetParameters",
@d-nishi
d-nishi / put-service-role.json
Last active May 21, 2019 05:57
CodeBuild Put Service Role
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "CloudWatchLogsPolicy",
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
@d-nishi
d-nishi / buildspec.yml
Created April 30, 2019 21:38
CodeBuild spec yaml
version: 0.2
phases:
install:
commands:
# pulumi
- curl -L https://get.pulumi.com/ | bash -s -- --version 0.16.2
- export PATH=$PATH:$HOME/.pulumi/bin
build:
commands: