Skip to content

Instantly share code, notes, and snippets.

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
annotations:
name: ingressgateway
spec:
selector:
istio: ingressgateway
servers:
- hosts:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: ingressgateway
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- dns1
#!/bin/bash -e
# Usage ./k8s-service-account-kubeconfig.sh ( namespace ) ( service account name )
TEMPDIR=$( mktemp -d )
trap "{ rm -rf $TEMPDIR ; exit 255; }" EXIT
SA_SECRET=$( kubectl get sa -n $1 $2 -o jsonpath='{.secrets[0].name}' )
@anoopl
anoopl / kafka-generate-ssl3.sh
Created August 5, 2019 13:32
Create Kafka JKS Keys
#!/bin/bash
#Step 1
#Generate server keystore and client keystore
keytool -keystore kafka.server.keystore.jks -alias localhost -validity 365 -genkey
keytool -keystore kafka.client.keystore.jks -alias localhost -validity 365 -genkey
#Step 2
#Create CA
openssl req -new -x509 -keyout ca-key -out ca-cert -days 365
#Add generated CA to the trust store
keytool -keystore kafka.server.truststore.jks -alias CARoot -import -file ca-cert