Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mick, Johanna
lab-k8s
Commits
5987edbe
Commit
5987edbe
authored
Oct 27, 2020
by
Nane Kratzke
Browse files
Aktualisieren .gitlab-ci.yml, deploy/prime-deployment.yaml Dateien
parent
40d4d5f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
5987edbe
...
...
@@ -26,4 +26,19 @@ container:
-
docker push $CI_REGISTRY_IMAGE:$VERSION
-
docker push $CI_REGISTRY_IMAGE:latest
codelab
:
stage
:
deploy
image
:
name
:
$KUBECTL
entrypoint
:
[
"
"
]
script
:
-
echo "Deploying to Kubernetes"
-
kubectl delete secret gitlab-registry-credentials -n $NAMESPACE ||
true
-
"
kubectl
create
secret
docker-registry
gitlab-registry-credentials
\
--docker-server=$CI_REGISTRY
\
--docker-username=$REGISTRY_READ_USER
\
--docker-password=$REGISTRY_READ_TOKEN
\
-n
$NAMESPACE"
-
kubectl apply -f deploy/ -n $NAMESPACE
deploy/prime-deployment.yaml
0 → 100644
View file @
5987edbe
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
prime-deployment
labels
:
app
:
prime
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
prime
template
:
metadata
:
labels
:
app
:
prime
spec
:
imagePullSecrets
:
-
name
:
gitlab-registry-credentials
containers
:
-
name
:
codepad
image
:
git.mylab.th-luebeck.de:4181/cloud-native/lab-k8s
ports
:
-
containerPort
:
80
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment