> For the complete documentation index, see [llms.txt](https://utm-1.gitbook.io/utm-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/prilozheniya/sites/site-test-utmsoft-ru.md).

# site-test-utmsoft-ru

## Установка через Argo CD

В github в репозитории argocd в каталоге `env-prod\apps` создать подкаталог `sites\test-utmsoft-ru` в котором создать файл `app.yaml` следующего содержания:

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name     : site-test-utmsoft-ru
  namespace: argocd
  labels:
    app: site-test-utmsoft-ru
spec:
  project: default
  destination:
    name     : in-cluster
    namespace: utm-sites
  sources:
  - repoURL: git@github.com:utenkov-maxim/argocd.git
    targetRevision: HEAD
    path: "env-prod/apps/sites/test-utmsoft-ru/manifests"
  syncPolicy:
    automated:
      prune   : true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
```

В каталоге `sites\test-utmsoft-ru` создать подкаталог `manifests` в котором создать следующие файлы:

**pvc.yaml**

```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-site-test-utmsoft-ru
  namespace: utm-sites
  labels:
    app: site-test-utmsoft-ru
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  storageClassName: smb-csi-utm-server4
```

**deploy.yaml**

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: site-test-utmsoft-ru
  namespace: utm-sites
  labels:
    app: site-test-utmsoft-ru
spec:
  replicas: 3
  selector:
    matchLabels:
      app: site-test-utmsoft-ru
  template:
    metadata:
      labels:
        app: site-test-utmsoft-ru
    spec:
      volumes:
      - name: smb-volume
        persistentVolumeClaim:
          claimName: pvc-site-test-utmsoft-ru
      containers:
      - name: site-test-utmsoft-ru
        image: nginx:latest
        ports:
        - containerPort: 80
        volumeMounts:
        - name: smb-volume
          mountPath: /usr/share/nginx/html
          readOnly: false
```

**svc.yaml**

```yaml
apiVersion: v1
kind: Service
metadata:
  name: site-test-utmsoft-ru
  namespace: utm-sites
  labels:
    app: site-test-utmsoft-ru
spec:
  type: ClusterIP
  ports:
    - port: 80
      targetPort: 80
  selector:
    app: site-test-utmsoft-ru
```

**ingress.yaml**

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: site-test-utmsoft-ru
  namespace: utm-sites
  labels:
    app: site-test-utmsoft-ru
spec:
  ingressClassName: nginx
  rules:
  - host: test.utmsoft.ru
    http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: site-test-utmsoft-ru
            port: 
              number: 80
```

Сделать коммит в github. После этого Argo CD развернет приложение site-test-utmsoft-ru в связанном кластере Kubernetes.

## Выкладывание сайта в PersistentVolume

Необходимо определить имя папки с PersistentVolume. Для этого выполнить:

```bash
kubectl -n utm-sites get pvc -l app=site-test-utmsoft-ru
```

Вывод команды

```
NAME                       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          VOLUMEATTRIBUTESCLASS   AGE
pvc-site-test-utmsoft-ru   Bound    pvc-71717918-dda0-463d-9ebd-bc9e97496ccf   1Gi        RWX            smb-csi-utm-server4   <unset>                 41m
```

В колонке VOLUME выводится имя папки в шаре samba

Далее необходимо подключиться по smb [к общей папке со всеми PersistentVolumes](/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/persistentvolumes/pv-cherez-csi-driver-smb/podgotovka-na-linux-servere.md)

Найти там папку с нужным именем.

Выложить в эту папку содержимое сайта.

<figure><img src="/files/qrXcUZ4lOaR31ep7cUD7" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://utm-1.gitbook.io/utm-docs/dokumentaciya/utm-it/resheniya/kubernetes/prilozheniya/sites/site-test-utmsoft-ru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
