Рет қаралды 6,238
Create a pod with single container and run a shell within that container to install curl packages and update the content when the container was running.
Command used:
kubectl apply -f k8s.io/example...
kubectl get pod shell-demo
kubectl exec --stdin --tty shell-demo -- /bin/bash
echo 'Hello shell demo' _ /usr/share/nginx/html/index.html
cat /usr/share/nginx/html/index.html
apt-get update
apt-get install curl
curl localhost/