Files
Schulung_Docker_k8s/k8s/pods
2022-12-14 14:37:30 +01:00

16 lines
544 B
Plaintext

kubectl create namespace whoami
kubectl config view
kubectl config set-context --current --namespace whoami
# create pod and service
kubectl run whoami --image bee42/whoami:2.2.0 --expose --port 80
kubectl get pods
kubectl get pods -o yaml
# see we created also a service!
kubectl get svc
kubectl run whoami --image bee42/whoami:2.2.0 --expose --port 80
kubectl get pod whoami -o yaml
# kann zur erstellung der YAML genutzt werden.
kubectl run whoami2 --image bee42/whoami:2.2.0 --labels=run=whoami --dry-run=client -o yaml >whoami-pod.yaml