Forums
Pod из YAML - Printable Version

+- Forums (https://forum.rotorocloud.ru)
+-- Forum: Курсы RotoroCloud (https://forum.rotorocloud.ru/forumdisplay.php?fid=1)
+--- Forum: Ответы Wiki (https://forum.rotorocloud.ru/forumdisplay.php?fid=3)
+---- Forum: kubernetes (https://forum.rotorocloud.ru/forumdisplay.php?fid=6)
+---- Thread: Pod из YAML (/showthread.php?tid=51)



Pod из YAML - rotoro - 07-06-2024

# Решение

#### Следуй этим шагам

##### 1. Создай болванку манифеста на джамп-хосте. Мы считаем, что наша директория это `/usr/official/`, а название файла `official.yml`.
```
cd /usr/official/
kubectl run nginx --image nginx --dry-run -oyaml | sudo tee official.yml
```

##### 2. Отредактируй метки в файле манифеста, как показано.
```
...
metadata:
  creationTimestamp: null
  labels:
    app: nginx-app # ИСПРАВЬ
  name: nginx
...
```

##### 3. Примени манифест и дождись запуска.
```
kubectl apply -f /usr/official/official.yml
```