This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: test-network-policy | |
namespace: default #You can specify the namespace by your requirement | |
spec: | |
podSelector: {} # Means select all | |
policyTypes: | |
- Egress | |
egress: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
cidrs=( $(az network list-service-tags -l "westus2" --query "values[?id=='Storage.WestUS2']" | jq -r '.[0].properties.addressPrefixes | .[]' ) ) | |
for i in "${cidrs[@]}" | |
do | |
if [[ $i =~ .*:.* ]] | |
then | |
echo "IPv6" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2012-2013, Riyad Parvez | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
// | |
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
// | |
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
// | |
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
for ID in $(az account list -o tsv --query '[*].id') | |
do | |
echo $ID | |
az advisor recommendation list --query "[?impact=='High']" -o table --subscription $ID | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prereq: | |
# 1. aks cluster | |
# 2. azure gateway V2 (rules setup not important, will be overwritten) | |
# 3. both of the above in the same Virtual network in azure. (different subnets). | |
$subscriptionId = '<azure-subscription-guid>'; | |
$resourceGroup = '<resource-group-name>'; | |
$rbac = $true; # on k8s cluster | |
$aksName = '<azure-kubernetes-cluster-name>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module AzureRm -Force | |
$TENANTID = '<REPLACE WITH YOUR AAD TENANT ID' | |
$SUBSCRIPTION_ID = '<REPLACE WITH YOUR SUBSCRIPTION ID>' | |
$SETTINGS_NAME = '<REPLACE WITH RANDOM NAME FOR DIAGNOSTIC SETTINGS NAME>' | |
$LA_RESOURCEGROUP_NAME = '<REPLACE WITH YOUR LOG ANALYTICS RESOURCE GROUP>' | |
$LA_WORKSPACE_NAME = '<REPLACE WITH YOUR LOG ANALYTICS WORKSPACE NAME>' | |
$LA_WORKSPACE_ID ='/subscriptions/{0}/resourcegroups/{1}/providers/microsoft.operationalinsights/workspaces/{2}' -f $SUBSCRIPTION_ID, $LA_RESOURCEGROUP_NAME, $LA_WORKSPACE_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Cluster | |
apiVersion: kind.sigs.k8s.io/v1alpha3 | |
nodes: | |
- role: control-plane | |
extraMounts: | |
- containerPath: /workdir/src/github.com/owensengoku/kind-run-test | |
hostPath: /Users/developer/kind-run-test | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM kindest/node:v1.13.4 | |
RUN apt-get update \ | |
&& apt-get install -y dnsutils iputils-ping \ | |
&& apt-get install -y make gcc musl-dev golang-go libzmqpp-dev | |
ENV GOPATH /go | |
RUN go version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: tiller | |
namespace: kube-system | |
--- | |
apiVersion: v1 | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Cluster | |
apiVersion: kind.sigs.k8s.io/v1alpha3 | |
nodes: | |
- role: control-plane | |
extraMounts: | |
- containerPath: /tmp-in-kind | |
hostPath: /tmp | |
readOnly: false | |
selinuxRelabel: false | |
propagation: None |
NewerOlder