Troubleshooting the amster
pod
When ForgeOps deployments start, the amster
pod starts and imports
AM dynamic configuration. Once dynamic configuration is imported, the
amster
pod is stopped and remains in Completed
status.
$ kubectl get pods NAME READY STATUS RESTARTS AGE admin-ui-b977c857c-2m9pq 1/1 Running 0 10m am-666687d69c-94thr 1/1 Running 0 12m amster-4prdg 0/1 Completed 0 12m ds-idrepo-0 1/1 Running 0 13m end-user-ui-674c4f79c-h4wgb 1/1 Running 0 10m idm-869679958c-brb2k 1/1 Running 0 12m login-ui-56dd46c579-gxrtx 1/1 Running 0 10m
Start the amster
pod
After you install AM, use the forgeops amster run command
to start the amster
pod for manually interacting with AM using
the forgeops amster run command line interface and perform tasks
such as exporting and importing AM configuration and troubleshooting:
$ ./bin/forgeops amster run --env-name my-env
starting...
...
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
admin-ui-b977c857c-2m9pq 1/1 Running 0 22m
am-666687d69c-94thr 1/1 Running 0 24m
amster-852fj 1/1 Running 0 12s
ds-idrepo-0 1/1 Running 0 25m
end-user-ui-674c4f79c-h4wgb 1/1 Running 0 22m
idm-869679958c-brb2k 1/1 Running 0 24m
login-ui-56dd46c579-gxrtx 1/1 Running 0 22m
The amster jobs have a default time-to-live (TTL) value set to 600 seconds. The amster jobs are removed from the namespace after 10 minutes to allow later runs of amster jobs if the spec is updated in the user’s environment and redeployed.
A Kubernetes job cannot be updated after it has started running. If the amster job is running when you apply an update, then an error is thrown. The beginning of the error appears similar to the following:
The Job "amster" is invalid: spec.template: Invalid value: ... ... "batch.kubernetes.io/job-name":"amster", ... "job-name":"amster"}
If an amster job fails due to low TTL, then delete amster jobs using the kubectl delete jobs command and redeploy.
Export and import AM configuration
To export AM configuration, use the forgeops amster export
command. Similarly, use the forgeops amster import command to
import AM configuration. At the end of the export or import session, the
amster
pod is stopped by default. To keep the amster
pod
running, use the --retain option. You can specify the time (in
seconds) to keep the amster
running. To keep it running indefinitely,
specify --retain infinity.
In the following example, the amster
pod is kept running for 900
seconds after completing export:
$ ./bin/forgeops amster export --env-name my-env --retain 900 /tmp/myexports
Cleaning up amster components
job.batch "amster" deleted
configmap "amster-files" deleted
Packing and uploading configs
configmap/amster-files created
configmap/amster-export-type created
configmap/amster-retain created
Deploying amster
job.batch/amster created
Waiting for amster job to complete. This can take several minutes.
pod/amster-d6vsv condition met
tar: Removing leading `/' from member names
Updating amster config.
Updating amster config complete.
$ kubectl get pods NAME READY STATUS RESTARTS AGE admin-ui-b977c857c-2m9pq 1/1 Running 0 27m am-666687d69c-94thr 1/1 Running 0 29m amster-d6vsv 1/1 Running 0 53s ds-idrepo-0 1/1 Running 0 30m end-user-ui-674c4f79c-h4wgb 1/1 Running 0 27m idm-869679958c-brb2k 1/1 Running 0 29m login-ui-56dd46c579-gxrtx 1/1 Running 0 27m
After 900 seconds notice that the amster
pod is in Completed
status:
$ kubectl get pods NAME READY STATUS RESTARTS AGE admin-ui-b977c857c-2m9pq 1/1 Running 0 78m am-666687d69c-94thr 1/1 Running 0 80m amster-d6vsv 0/1 Completed 0 51m ds-idrepo-0 1/1 Running 0 81m end-user-ui-674c4f79c-h4wgb 1/1 Running 0 78m idm-869679958c-brb2k 1/1 Running 0 80m login-ui-56dd46c579-gxrtx 1/1 Running 0 78m