Skip to content

Instantly share code, notes, and snippets.

View michalpenka's full-sized avatar

Michal Pěnka michalpenka

View GitHub Profile
@michalpenka
michalpenka / 01-04-azure-pipelines.yml
Last active March 18, 2020 14:07
Azure DevOps build pipeline
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
resources:
- repo: self
apiVersion: v1
kind: Namespace
metadata:
name: helloworld
kubectl apply -f namespace.yml
kubectl get namespaces
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-helloworld
namespace: helloworld
spec:
replicas: 2
selector:
matchLabels:
app: app-helloworld
kubectl -n helloworld get deployments
apiVersion: v1
kind: Service
metadata:
name: svc-helloworld
namespace: helloworld
spec:
ports:
- port: 80
selector:
app: app-helloworld
kubectl -n helloworld describe service svc-helloworld
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
sed -i -e \
's/quay.io\/kubernetes-ingress-controller\/nginx-ingress-controller:0.30.0/quay.io\/kubernetes-ingress-controller\/nginx-ingress-controller-arm64:0.30.0/g' \
mandatory.yaml