Weitere ähnliche Inhalte Ähnlich wie Helm introduction (20) Mehr von Marc Müller (20) Helm introduction7. apiVersion: apps/v1
kind: Deployment
metadata:
name: helloworld-dev
namespace: dev
generation: 1
labels:
app.kubernetes.io/instance: helloworld-dev
app.kubernetes.io/name: helloworld
app.kubernetes.io/version: 1.16.0
annotations:
deployment.kubernetes.io/revision: '1'
replicas: 2
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/instance: helloworld-dev
app.kubernetes.io/name: helloworld
template:
metadata:
labels:
app.kubernetes.io/instance: helloworld-dev
app.kubernetes.io/name: helloworld
spec:
containers:
- name: helloworld
image: 4tecture/hello-world:v3.1
ports:
- name: http
containerPort: 80
protocol: TCP
env:
- name: DeploymentEnvironment
value: Development
- name: Message
value: Hello dear audience!
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
securityContext: {}
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: helloworld-dev
serviceAccount: helloworld-dev
securityContext: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
8. apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: helloworld-dev
namespace: dev
generation: 1
labels:
app.kubernetes.io/instance: helloworld-dev
app.kubernetes.io/name: helloworld
app.kubernetes.io/version: 1.16.0
annotations:
cert-manager.io/issuer: letsencrypt
spec:
ingressClassName: nginx
tls:
- hosts:
- helloworld.dev.aksdemo.4tecture.ch
secretName: helloworld-dev-tls
rules:
- host: helloworld.dev.aksdemo.4tecture.ch
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: helloworld-dev
port:
number: 80
24. apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
data:
myvalue: “My Sample"
foo: {{ .Values.mySettings.foo | repeat 5 | quote }} # Output for Abc → “AbcAbcAbcAbc”
bar: {{ .Values.mySettings.bar | upper | quote }}# Output for Abc → “ABC”
s1: {{ .Values.mySettings.s1 | default “MyDefault” | quote }}# Output for <not set> → “MyDefault”
25. lookup <apiVersion> <kind> <namepace> <name>
(lookup "v1" "Namespace" "" "mynamespace").metadata.annotations
Behavior Lookup Function
kubectl get pod mypod -n mynamespace lookup "v1" "Pod" "mynamespace" "mypod"
kubectl get pods -n mynamespace lookup "v1" "Pod" "mynamespace" ""
kubectl get pods --all-namespaces lookup "v1" "Pod" "" ""
kubectl get namespace mynamespace lookup "v1" "Namespace" "" "mynamespace"
kubectl get namespaces lookup "v1" "Namespace" "" ""
35. ▪
helm install <release name> <repo>/<chart>
helm install foo stable/foo
▪
helm install <release name> <path to *.tgz>
helm install foo foo-0.0.1.tgz
▪
helm install <release name> <path to chart>
helm install foo path/to/foo
▪
helm install <release name> <url>
helm install foo https://myurl.com/charts/foo-0.0.1.tgz
46. Azure DevOps
CI Pipeline
Azure DevOps
CD Pipeline
Container
Registry
Build App
Test
Build Container
Repo
Configuration
Helm Upgrade
AKS (Cluster)
Helm Chart
Package
Push
Cluster
Pull container image
Release
Pull
Helm
chart