42 lines
1.2 KiB
Bash
Executable File
42 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This is a history like script to memorise all actions
|
|
# needed to deploy the microservice applications into
|
|
# kubernetes cluster.
|
|
#
|
|
# nocr
|
|
#
|
|
|
|
# First initialize the namespace
|
|
|
|
kubectl create namespace nocr
|
|
|
|
# Create secret for accessing registry hub with application
|
|
# artifacts.
|
|
|
|
kubectl create secret docker-registry hubcred --docker-server=https://hub.musk.fun/v1/ --docker-username=admin --docker-password=password --docker-email=some@email.com --namespace nocr
|
|
|
|
# Create the persistent volume for the whole application
|
|
# and do the claims all that needs and shares the volume.
|
|
|
|
# kubectl apply -f pv.yaml
|
|
# bubectl apply -f pvc.yaml
|
|
|
|
# NB. There is very URGENT consideration, that even running local
|
|
# single noded k9s cluster, should avoid of beeing tainted, rather
|
|
# and deployment wont start automatical.
|
|
# THis done by the next command:
|
|
#
|
|
# kubectl taint nodes --all node-role.kubernetes.io/control-plane-
|
|
#
|
|
|
|
# next we have to edit secret files for services appllication config.
|
|
# This made like:
|
|
#
|
|
# kubectl create secret generic protected-appsettings --from-file=.secrets/appsettings.protected.json --namespace=nocr
|
|
#
|
|
|
|
# Make the main deployment.
|
|
|
|
kubectl apply -f deployment.yaml
|