teampass_deploy
Differences
This shows you the differences between two versions of the page.
| teampass_deploy [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadm | teampass_deploy [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== TeamPass deployment ====== | ||
| - | <file bash> | ||
| - | $ kubectl create ns teampass-system | ||
| - | namespace/ | ||
| - | </ | ||
| - | |||
| - | <file yaml pvc-teampass.yaml> | ||
| - | apiVersion: v1 | ||
| - | kind: PersistentVolumeClaim | ||
| - | metadata: | ||
| - | name: teampass | ||
| - | namespace: teampass-system | ||
| - | spec: | ||
| - | accessModes: | ||
| - | - ReadWriteOnce | ||
| - | storageClassName: | ||
| - | resources: | ||
| - | requests: | ||
| - | storage: 4Gi | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl apply -f pvc-teampass.yaml | ||
| - | persistentvolumeclaim/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl get pvc -n teampass-system | ||
| - | NAME | ||
| - | teampass | ||
| - | </ | ||
| - | |||
| - | <file yaml> | ||
| - | $ cat secret-db.yaml | ||
| - | apiVersion: v1 | ||
| - | kind: Secret | ||
| - | metadata: | ||
| - | name: db-secrets | ||
| - | namespace: teampass-system | ||
| - | data: | ||
| - | MYSQL_PASSWORD: | ||
| - | MYSQL_ROOT_PASSWORD: | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl apply -f secret-db.yaml | ||
| - | secret/ | ||
| - | </ | ||
| - | |||
| - | <file yaml db-teampass.yaml> | ||
| - | apiVersion: apps/v1 | ||
| - | kind: Deployment | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: db-teampass | ||
| - | name: db-teampass | ||
| - | namespace: teampass-system | ||
| - | spec: | ||
| - | replicas: 1 | ||
| - | selector: | ||
| - | matchLabels: | ||
| - | app: db-teampass | ||
| - | strategy: {} | ||
| - | template: | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: db-teampass | ||
| - | spec: | ||
| - | securityContext: | ||
| - | fsGroup: 1001 | ||
| - | runAsUser: 1001 | ||
| - | containers: | ||
| - | - env: | ||
| - | - name: MYSQL_DATABASE | ||
| - | value: teampass | ||
| - | - name: MYSQL_PASSWORD | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | name: db-secrets | ||
| - | key: MYSQL_PASSWORD | ||
| - | - name: MYSQL_ROOT_PASSWORD | ||
| - | valueFrom: | ||
| - | secretKeyRef: | ||
| - | name: db-secrets | ||
| - | key: MYSQL_ROOT_PASSWORD | ||
| - | - name: MYSQL_USER | ||
| - | value: teampass | ||
| - | image: hub.juntotelecom.com.br/ | ||
| - | imagePullPolicy: | ||
| - | name: db-teampass | ||
| - | resources: {} | ||
| - | volumeMounts: | ||
| - | - mountPath: / | ||
| - | name: db-teampass | ||
| - | volumes: | ||
| - | - name: db-teampass | ||
| - | persistentVolumeClaim: | ||
| - | claimName: teampass | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl get pods -n teampass-system -o wide | ||
| - | NAME | ||
| - | db-teampass-5cff5b5985-qqznl | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl describe pod db-teampass-5cff5b5985-qqznl -n teampass-system | ||
| - | Name: | ||
| - | Namespace: | ||
| - | Priority: | ||
| - | Node: | ||
| - | Start Time: Thu, 19 May 2022 18:30:47 -0300 | ||
| - | Labels: | ||
| - | pod-template-hash=5cff5b5985 | ||
| - | Annotations: | ||
| - | cni.projectcalico.org/ | ||
| - | cni.projectcalico.org/ | ||
| - | Status: | ||
| - | IP: | ||
| - | IPs: | ||
| - | IP: | ||
| - | IP: | ||
| - | Controlled By: ReplicaSet/ | ||
| - | Containers: | ||
| - | db-teampass: | ||
| - | Container ID: | ||
| - | Image: | ||
| - | Image ID: | ||
| - | Port: < | ||
| - | Host Port: < | ||
| - | State: | ||
| - | Started: | ||
| - | Ready: | ||
| - | Restart Count: | ||
| - | Environment: | ||
| - | MYSQL_DATABASE: | ||
| - | MYSQL_PASSWORD: | ||
| - | MYSQL_ROOT_PASSWORD: | ||
| - | MYSQL_USER: | ||
| - | Mounts: | ||
| - | / | ||
| - | / | ||
| - | Conditions: | ||
| - | Type Status | ||
| - | Initialized | ||
| - | Ready True | ||
| - | ContainersReady | ||
| - | PodScheduled | ||
| - | Volumes: | ||
| - | db-teampass: | ||
| - | Type: | ||
| - | ClaimName: | ||
| - | ReadOnly: | ||
| - | kube-api-access-bt56s: | ||
| - | Type: Projected (a volume that contains injected data from multiple sources) | ||
| - | TokenExpirationSeconds: | ||
| - | ConfigMapName: | ||
| - | ConfigMapOptional: | ||
| - | DownwardAPI: | ||
| - | QoS Class: | ||
| - | Node-Selectors: | ||
| - | Tolerations: | ||
| - | | ||
| - | Events: | ||
| - | Type Reason | ||
| - | ---- ------ | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | </ | ||
| - | |||
| - | <file yaml db-service.yaml> | ||
| - | apiVersion: v1 | ||
| - | kind: Service | ||
| - | metadata: | ||
| - | creationTimestamp: | ||
| - | labels: | ||
| - | app: db-teampass | ||
| - | name: db-teampass | ||
| - | namespace: teampass-system | ||
| - | spec: | ||
| - | ipFamilies: | ||
| - | - IPv4 | ||
| - | - IPv6 | ||
| - | ipFamilyPolicy: | ||
| - | ports: | ||
| - | - name: " | ||
| - | port: 3306 | ||
| - | targetPort: 3306 | ||
| - | selector: | ||
| - | app: db-teampass | ||
| - | type: ClusterIP | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl apply -f db-service.yaml | ||
| - | service/ | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl describe service db-teampass -n teampass-system | ||
| - | Name: db-teampass | ||
| - | Namespace: | ||
| - | Labels: | ||
| - | Annotations: | ||
| - | Selector: | ||
| - | Type: ClusterIP | ||
| - | IP Family Policy: | ||
| - | IP Families: | ||
| - | IP: 10.96.197.88 | ||
| - | IPs: | ||
| - | Port: 3306 3306/TCP | ||
| - | TargetPort: | ||
| - | Endpoints: | ||
| - | Session Affinity: | ||
| - | Events: | ||
| - | </ | ||
| - | |||
| - | <file yaml pvc-html.yaml> | ||
| - | apiVersion: v1 | ||
| - | kind: PersistentVolumeClaim | ||
| - | metadata: | ||
| - | name: teampass-html | ||
| - | namespace: teampass-system | ||
| - | spec: | ||
| - | accessModes: | ||
| - | - ReadWriteOnce | ||
| - | storageClassName: | ||
| - | resources: | ||
| - | requests: | ||
| - | storage: 1Gi | ||
| - | </ | ||
| - | |||
| - | <file bashs> | ||
| - | $ kubectl apply -f pvc-html.yaml | ||
| - | persistentvolumeclaim/ | ||
| - | </ | ||
| - | |||
| - | <file yaml teampass-deploy.yaml> | ||
| - | apiVersion: apps/v1 | ||
| - | kind: Deployment | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: teampass | ||
| - | name: teampass | ||
| - | namespace: teampass-system | ||
| - | spec: | ||
| - | replicas: 1 | ||
| - | selector: | ||
| - | matchLabels: | ||
| - | app: teampass | ||
| - | strategy: {} | ||
| - | template: | ||
| - | metadata: | ||
| - | labels: | ||
| - | app: teampass | ||
| - | spec: | ||
| - | containers: | ||
| - | - image: hub.juntotelecom.com.br/ | ||
| - | name: teampass | ||
| - | ports: | ||
| - | - containerPort: | ||
| - | - containerPort: | ||
| - | volumeMounts: | ||
| - | - mountPath: / | ||
| - | name: teampass-html | ||
| - | restartPolicy: | ||
| - | securityContext: | ||
| - | fsGroup: 1001 | ||
| - | runAsUser: 1001 | ||
| - | volumes: | ||
| - | - name: teampass-html | ||
| - | persistentVolumeClaim: | ||
| - | claimName: teampass-html | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl apply -f teampass-deploy.yaml | ||
| - | deployment.apps/ | ||
| - | </ | ||
| - | |||
| - | <file bashs> | ||
| - | $ kubectl get pods -n teampass-system -o wide | ||
| - | NAME | ||
| - | db-teampass-5cff5b5985-qqznl | ||
| - | teampass-64778bb6c9-lwg4q | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl describe pod teampass-64778bb6c9-lwg4q -n teampass-system | ||
| - | Name: | ||
| - | Namespace: | ||
| - | Priority: | ||
| - | Node: | ||
| - | Start Time: Thu, 19 May 2022 18:48:38 -0300 | ||
| - | Labels: | ||
| - | pod-template-hash=64778bb6c9 | ||
| - | Annotations: | ||
| - | cni.projectcalico.org/ | ||
| - | cni.projectcalico.org/ | ||
| - | Status: | ||
| - | IP: | ||
| - | IPs: | ||
| - | IP: | ||
| - | IP: | ||
| - | Controlled By: ReplicaSet/ | ||
| - | Containers: | ||
| - | teampass: | ||
| - | Container ID: | ||
| - | Image: | ||
| - | Image ID: | ||
| - | Ports: | ||
| - | Host Ports: | ||
| - | State: | ||
| - | Started: | ||
| - | Last State: | ||
| - | Reason: | ||
| - | Exit Code: 2 | ||
| - | Started: | ||
| - | Finished: | ||
| - | Ready: | ||
| - | Restart Count: | ||
| - | Environment: | ||
| - | Mounts: | ||
| - | / | ||
| - | / | ||
| - | Conditions: | ||
| - | Type Status | ||
| - | Initialized | ||
| - | Ready True | ||
| - | ContainersReady | ||
| - | PodScheduled | ||
| - | Volumes: | ||
| - | teampass-html: | ||
| - | Type: | ||
| - | ClaimName: | ||
| - | ReadOnly: | ||
| - | kube-api-access-kgg69: | ||
| - | Type: Projected (a volume that contains injected data from multiple sources) | ||
| - | TokenExpirationSeconds: | ||
| - | ConfigMapName: | ||
| - | ConfigMapOptional: | ||
| - | DownwardAPI: | ||
| - | QoS Class: | ||
| - | Node-Selectors: | ||
| - | Tolerations: | ||
| - | | ||
| - | Events: | ||
| - | Type Reason | ||
| - | ---- ------ | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | Normal | ||
| - | </ | ||
| - | |||
| - | <file yaml service-teampass.yaml> | ||
| - | apiVersion: v1 | ||
| - | kind: Service | ||
| - | metadata: | ||
| - | annotations: | ||
| - | labels: | ||
| - | app: teampaass | ||
| - | name: teampass | ||
| - | namespace: teampass-system | ||
| - | spec: | ||
| - | ipFamilies: | ||
| - | - IPv4 | ||
| - | - IPv6 | ||
| - | ipFamilyPolicy: | ||
| - | ports: | ||
| - | - name: http | ||
| - | port: 80 | ||
| - | protocol: TCP | ||
| - | targetPort: http | ||
| - | - name: https | ||
| - | port: 443 | ||
| - | protocol: TCP | ||
| - | targetPort: https | ||
| - | selector: | ||
| - | app: teampass | ||
| - | type: ClusterIP | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ kubectl apply -f service-teampass.yaml | ||
| - | service/ | ||
| - | </ | ||
| - | |||
| - | <file bashs> | ||
| - | $ kubectl get service -n teampass-system | ||
| - | NAME TYPE CLUSTER-IP | ||
| - | db-teampass | ||
| - | teampass | ||
| - | </ | ||
| - | |||
teampass_deploy.1753560544.txt.gz · Last modified: by wikiadm
