Skip to content

Instantly share code, notes, and snippets.

Akash Gautam akash-gautam

  • Pune, India
View GitHub Profile
View testsvc.yaml
kind: Service
apiVersion: v1
metadata:
name: opa-service
spec:
type: LoadBalancer
selector:
app: opa-app
ports:
- protocol: TCP
View deny-lb-type-svc-dev-ns.yaml
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: LBTypeSvcNotAllowed
metadata:
name: deny-lb-type-svc-dev-ns
spec:
match:
kinds:
- apiGroups: [""]
kinds: ["Service"]
namespaces:
@akash-gautam
akash-gautam / deny-lb-type-svc.yaml
Created May 18, 2020
Constraint Template to deny service of type LoadBalancer
View deny-lb-type-svc.yaml
apiVersion: templates.gatekeeper.sh/v1beta1
kind: ConstraintTemplate
metadata:
name: lbtypesvcnotallowed
spec:
crd:
spec:
names:
kind: LBTypeSvcNotAllowed
listKind: LBTypeSvcNotAllowedList
View message-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: message-configmap
labels:
app: message-app
data:
MESSAGE: "This too shall pass" #Put the message you want to display here.
View argocd-install
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
View message-app-staging.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: message-app-staging
namespace: argocd
environment: staging
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
View ekskubeconfig.yaml
apiVersion: v1
clusters:
- cluster:
server: https://DBFE36D09896EECAB426959C35FFCC47.sk1.us-east-1.eks.amazonaws.com
certificate-authority-data: ”....................”
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: aws
View create-cluster.json
{
"cluster": {
"status": "CREATING",
"name": "eks-blog-cluster",
"certificateAuthority": {},
"roleArn": "arn:aws:iam::XXXXXXXXXXXX:role/eks-service-role",
"resourcesVpcConfig": {
"subnetIds": [
"subnet-0b8da2094908e1b23",
"subnet-01a46af43b2c5e16c"
View aws-auth.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: aws-auth
namespace: kube-system
data:
mapRoles: |
- rolearn: <ARN of instance role (not instance profile)>
username: system:node:{{EC2PrivateDNSName}}
groups:
View pvc-resize-msg.txt
Conditions:
Type Status LastProbeTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
FileSystemResizePending True Mon, 01 Jan 0001 00:00:00 +0000 Mon, 30 Sep 2019 15:07:01 +0530 Waiting for user to (re-)start a pod to finish file system resize of volume on node.
You can’t perform that action at this time.