-
kubectl apply -f test.yml
- K8S is not allowed to load pods in master by default
- Error:
Warning FailedScheduling default-scheduler 0/1 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
- Solu:
kubectl taint nodes --all node-role.kubernetes.io/master-
- Error:
-
[root@t:/k8s]# kubectl get pods NAME READY STATUS RESTARTS AGE nginx-7fb7fd49b4-t8rmm 1/1 Running 0 26m [root@t:/k8s]# kubectl get deploy nginx -o wide NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR nginx 1/1 1 1 26m nginx nginx:alpine app=nginx [root@t:/k8s]# kubectl get pod nginx-7fb7fd49b4-t8rmm -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-7fb7fd49b4-t8rmm 1/1 Running 0 26m 172.16.0.6 t <none> <none>
-
kubectl exec -it nginx-7fb7fd49b4-t8rmm -- /bin/sh
-
[root@t:/k8s]# kubectl get service nginx-service -o wide NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR nginx-service NodePort 10.97.61.67 <none> 80:8080/TCP 31s app=nginx
-
kubectl get [deploy|pod|service] [container name] --output=yaml kubectl describe [deploy|pod|service] [container name]
- According to the solution above, I want to create a multi containers pod: one for binary dll and the other used for runtime, but the k8s pod status will be NotReady if any container exit:
- the root process stopped, the docker container stopped
- the root process you start in container instead of [/sbin/init] : pid 1
k8s note
最新推荐文章于 2024-08-16 00:54:56 发布