"Helm install --dry-run"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
42번째 줄: 42번째 줄:
==실습 2==
==실습 2==
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
testuser@localhost:~$ helm create mychart
$ helm create mychart
Creating mychart
Creating mychart
</syntaxhighlight>
$ helm install aaa --dry-run ./mychart/
<syntaxhighlight lang='console'>
testuser@localhost:~$ cd mychart/
testuser@localhost:~/mychart$ helm install aaa --dry-run .
NAME: aaa
NAME: aaa
LAST DEPLOYED: Mon Nov 14 11:31:50 2022
LAST DEPLOYED: Mon Nov 14 11:31:50 2022
80번째 줄: 77번째 줄:
apiVersion: v1
apiVersion: v1
kind: ServiceAccount
kind: ServiceAccount
metadata:
...
  name: aaa-mychart
  labels:
    helm.sh/chart: mychart-0.1.0
    app.kubernetes.io/name: mychart
    app.kubernetes.io/instance: aaa
    app.kubernetes.io/version: "1.16.0"
    app.kubernetes.io/managed-by: Helm
---
# Source: mychart/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: aaa-mychart
  labels:
    helm.sh/chart: mychart-0.1.0
    app.kubernetes.io/name: mychart
    app.kubernetes.io/instance: aaa
    app.kubernetes.io/version: "1.16.0"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - port: 80
      targetPort: http
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/name: mychart
    app.kubernetes.io/instance: aaa
---
# Source: mychart/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: aaa-mychart
  labels:
    helm.sh/chart: mychart-0.1.0
    app.kubernetes.io/name: mychart
    app.kubernetes.io/instance: aaa
    app.kubernetes.io/version: "1.16.0"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: mychart
      app.kubernetes.io/instance: aaa
  template:
    metadata:
      labels:
        app.kubernetes.io/name: mychart
        app.kubernetes.io/instance: aaa
    spec:
      serviceAccountName: aaa-mychart
      securityContext:
        {}
      containers:
        - name: mychart
          securityContext:
            {}
          image: "nginx:1.16.0"
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 80
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: http
          readinessProbe:
            httpGet:
              path: /
              port: http
          resources:
            {}
 
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=mychart,app.kubernetes.io/instance=aaa" -o jsonpath="{.items[0].metadata.name}")
  export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
</syntaxhighlight>
</syntaxhighlight>


169번째 줄: 83번째 줄:
* [[helm install]]
* [[helm install]]
* [[helm create]]
* [[helm create]]
* [[helm pull]]


[[분류: helm install]]
[[분류: helm install]]

2023년 9월 21일 (목) 11:52 기준 최신판

1 개요[ | ]

helm install --dry-run

2 실습 1[ | ]

$ helm pull ingress-nginx/ingress-nginx --version=4.7.0
$ ls *.tgz
ingress-nginx-4.7.0.tgz
$ helm install in -n ingress ingress-nginx-4.7.0.tgz --dry-run
LAST DEPLOYED: Thu Sep 21 02:49:11 2023
NAMESPACE: ingress
STATUS: pending-install
REVISION: 1
TEST SUITE: None
HOOKS:
---
# Source: ingress-nginx/templates/admission-webhooks/job-patch/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: in-ingress-nginx-admission
  namespace: ingress
  annotations:
    "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
  labels:
    helm.sh/chart: ingress-nginx-4.7.0
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/instance: in
    app.kubernetes.io/version: "1.8.0"
    app.kubernetes.io/part-of: ingress-nginx
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: admission-webhook
---
# Source: ingress-nginx/templates/admission-webhooks/job-patch/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
...

3 실습 2[ | ]

$ helm create mychart
Creating mychart
$ helm install aaa --dry-run ./mychart/
NAME: aaa
LAST DEPLOYED: Mon Nov 14 11:31:50 2022
NAMESPACE: default
STATUS: pending-install
REVISION: 1
HOOKS:
---
# Source: mychart/templates/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
  name: "aaa-mychart-test-connection"
  labels:
    helm.sh/chart: mychart-0.1.0
    app.kubernetes.io/name: mychart
    app.kubernetes.io/instance: aaa
    app.kubernetes.io/version: "1.16.0"
    app.kubernetes.io/managed-by: Helm
  annotations:
    "helm.sh/hook": test
spec:
  containers:
    - name: wget
      image: busybox
      command: ['wget']
      args: ['aaa-mychart:80']
  restartPolicy: Never
MANIFEST:
---
# Source: mychart/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
...

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}