Create a faulty pod and Fix it

Create a faulty pod and Fix it

Create a faulty pod

vim pod2.yaml        

write the pod definition file

apiVersion: v1
kind: Pod
metadata:
  name: nginx12
spec:
  containers:
  - name: nginx
    image: nginox:1.14.2
    ports:
    - containerPort: 80        
kubectl apply -f pod2.yaml        

Find the problem

kubectl get pod        
kubectl get pod -o wide        
kubectl get pod nginx12 -o yaml        
kubectl describe pod nginx12        
kubectl logs nginx12        

Fix it

vim pod2.yaml        

update the pod definition file

apiVersion: v1
kind: Pod
metadata:
  name: nginx12
spec:
  containers:
  - name: nginx
    image: nginx:latest
    ports:
    - containerPort: 80
        
kubectl apply -f pod2.yaml        




要查看或添加评论,请登录

Muhammad Afaq Nasir的更多文章

  • Clean and Secure Code with SonarCloud

    Clean and Secure Code with SonarCloud

    ?? Ensuring Clean and Secure Code with SonarCloud In today's fast-paced development world, code quality and security…

    1 条评论
  • Exploring Ansible Galaxy: A Comprehensive Guide

    Exploring Ansible Galaxy: A Comprehensive Guide

    Introduction: Ansible has emerged as a leading automation platform, enabling IT professionals to streamline their…

  • AWS Announces Changes to Public IPv4 Address Pricing

    AWS Announces Changes to Public IPv4 Address Pricing

    Introduction: In a recent update, AWS has announced a significant modification to its pricing structure concerning…

  • Lifecycle of a Docker container

    Lifecycle of a Docker container

    The lifecycle of a Docker container consists of the following states: 1. Created: A container that has been created but…

    1 条评论
  • Benefits of Docker?

    Benefits of Docker?

    Docker is a popular containerization platform that offers several benefits for developers, operations teams, and…

  • A list of Youtube channels to learn DevOps

    A list of Youtube channels to learn DevOps

    DevOps A list of Youtube channels to learn DevOps Note: This tutorial should be studied, the way I numbered it…

  • Why DevOps?

    Why DevOps?

    The short answer is that DevOps increases productivity by allowing developers to do what they do best: build fantastic…

社区洞察

其他会员也浏览了