User Tools

Site Tools


kubernetes:usage

This is an old revision of the document!


Namespace anlegen

Namespace mit Namen demo anlegen

kubectl create namespace demo

Namespace demo als aktuellen context festlegen

kubectl set-context --current --namespace=demo

Pod mit nginx starten und Port 80 freigeben

kubectl run web --image nginx --labels app=web --expose --port 80

Zweiten Pod mit alpine-Linux interaktiv starten, curl installieren und web-Pod (nginx) aufrufen

kubectl run test --rm --tty -i --image alpine -- /bin/sh
apk add curl
curl web
...
<h1>Welcome to nginx!</h1>
...
kubernetes/usage.1617807610.txt.gz · Last modified: 2023/01/11 20:30 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki