Welcome to the Linux Foundation Forum!

Excercise A.3 33 review6.yaml: error: unable to upgrade connection: container not found ("webguy")

  1. After finding the errors, log into the container and find the proper id of the nginx user.

I try:

  1. guettli@p15:~/.kube$ k exec -it securityreview -- sh
  2. error: unable to upgrade connection: container not found ("webguy")

How to log into the container?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 1
    edited April 2022

    I don't know how to log into an unstarted container, but since the error for me was at startup regarding the mkdir of folders due to lack of permissions (as seen from kubectl logs) I harnessed the yaml as follows to pre-provide the temp folders and the nginx container now goes in Running.

    1. apiVersion: v1
    2. kind: Pod
    3. metadata:
    4. name: securityreview
    5. spec:
    6. securityContext:
    7. runAsUser: 2100
    8. volumes:
    9. - name: nginx-dir
    10. emptyDir: {}
    11. - name: nginx-empty
    12. emptyDir: {}
    13. - name: nginx-run
    14. emptyDir: {}
    15. containers:
    16. - name: webguy
    17. image: nginx
    18. volumeMounts:
    19. - mountPath: /etc/nginx/conf.d/
    20. name: nginx-dir
    21. - mountPath: /var/cache/nginx/client_temp
    22. name: nginx-empty
    23. - mountPath: /var/run/
    24. name: nginx-run
    25. securityContext:
    26. runAsUser: 3000
    27. allowPrivilegeEscalation: false
  • @chrispokorni can you please answer this question.

  • Posts: 34
    edited June 2022

    @guettli did you find any solution to this problem.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training