Difference between revisions of "Kubectl attach"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
Error from server (BadRequest): pod myalpinedataaccess [[does not have a host assigned]] | Error from server (BadRequest): pod myalpinedataaccess [[does not have a host assigned]] | ||
− | Solution: maybe pod is in pending state | + | Solution: maybe pod is in pending state, [[kubectl get events]] |
+ | 3m29s Warning FailedScheduling Pod/myalpinedataaccess 0/1 nodes are available: persistentvolumeclaim "pvc-a501d138-69e4-4dda-81fb-0fbf8cf2d234" not found. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.. | ||
Line 14: | Line 15: | ||
[[kubectl attach ubuntu -c ubuntu -i -t]] | [[kubectl attach ubuntu -c ubuntu -i -t]] | ||
+ | |||
+ | [[exec kubectl attach -i -t -n default nginx -c nginx]] | ||
+ | |||
Line 21: | Line 25: | ||
- name: your-name | - name: your-name | ||
image: your-name:latest | image: your-name:latest | ||
− | tty: true | + | [[tty:]] true |
[[stdin:]] true | [[stdin:]] true | ||
== Related == | == Related == | ||
− | + | * <code>[[kubectl exec]]</code> | |
− | + | * <code>[[kubectl debug]]</code> | |
+ | * <code>[[exec kubectl attach -i -t -n default alpine -c alpine]]</code> | ||
== See also == | == See also == | ||
− | * {{ | + | * {{kubectl attach}} |
[[Category: Kubectl]] | [[Category: Kubectl]] |
Latest revision as of 10:28, 22 October 2024
Unable to use a TTY - container your-container did not allocate one
kubectl attach myalpinedataaccess -i If you don't see a command prompt, try pressing enter. Error from server (BadRequest): pod myalpinedataaccess does not have a host assigned Solution: maybe pod is in pending state, kubectl get events 3m29s Warning FailedScheduling Pod/myalpinedataaccess 0/1 nodes are available: persistentvolumeclaim "pvc-a501d138-69e4-4dda-81fb-0fbf8cf2d234" not found. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling..
kubectl attach my-pod -i https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources
kubectl attach ubuntu -c ubuntu -i -t
exec kubectl attach -i -t -n default nginx -c nginx
spec: containers: - name: your-name image: your-name:latest tty: true stdin: true
Related[edit]
See also[edit]
Advertising: