Deployment起動
1 2 |
kubectl run aks-nginx-deployment --image=nginx --labels="app=nginx" --replicas=3 |
ホスト名をこぴる
1 2 3 4 5 |
for PODNAME in `kubectl get pods -l app=nginx \ -o jsonpath='{.items[*].metadata.name}'` ; \ do kubectl exec -it ${PODNAME} -- \ cp /etc/hostname /usr/share/nginx/html/index.html; \ done |