Mega Menu

Showing posts with label Kubernetes Pod Creation. Show all posts
Showing posts with label Kubernetes Pod Creation. Show all posts

Saturday, March 07, 2020

Kubernetes basic yaml file for Pod Creation

Kubernetes plugin to IDEs for easy YML file creation.
     https://plugins.jetbrains.com/plugin/10485-kubernetes/

Pod creation from public containers without yml -
    kubectl run nginx --image=nginx 

pod-create.yml

apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod1
  labels:
     app: myapp
     type: ui
spec:
  containers:
    -  name: hello-world
       image: hello-world


Sample Scripts:
Script to create pod -
     kubectl create -f pod-create.yml

View the pod -
    kubectl get pods
    kubectl describe pods

Delete pod -
    kubectl delete pod myapp-pod1