Kubernetes Workloads


docker login -u your-docker-id -p your-access-token

sudo -i

cd /home/wasadmin/Works

minikube status

minikube stop

minikube start --driver=none

minikube status

minikube dashboard (From previous lab - optional)

gedit nginx-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80


kubectl create -f nginx-deployment.yaml
kubectl get deployments

kubectl rollout status deployment.v1.apps/nginx-deployment

kubectl get deployment nginx-deployment -o yaml

kubectl get pods --show-labels

kubectl describe deployment nginx-deployment

gedit nginx-deployment.yaml

kubectl apply -f nginx-deployment.yaml

kubectl rollout status deployment.v1.apps/nginx-deployment

kubectl get deployments

kubectl describe deployment nginx-deployment

kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.91

kubectl rollout status deployment.v1.apps/nginx-deployment

kubectl get pods

kubectl rollout undo deployment.v1.apps/nginx-deployment

kubectl get pods

kubectl scale deployment.v1.apps/nginx-deployment --replicas=1

kubectl get deployments nginx-deployment

kubectl rollout pause deployment.v1.apps/nginx-deployment

kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.9.2

kubectl rollout status deployment.v1.apps/nginx-deployment

kubectl rollout resume deployment.v1.apps/nginx-deployment

kubectl rollout status deployment.v1.apps/nginx-deployment

kubectl describe deployment nginx-deployment

kubectl delete deployments/nginx-deployment

kubectl get deployments

kubectl get pods

minikube stop

minikube delete

More Exams & Flashcards!

264K+

Active Users

100K+

Team Members

855K+

Line Of Code

295K+

Cup Of Coffee

//========= glightbox GLightbox({ 'href': 'https://www.youtube.com/watch?v=r44RKWyfcFw&fbclid=IwAR21beSJORalzmzokxDRcGfkZA1AtRTE__l5N4r09HcGS5Y6vOluyouM9EM', 'type': 'video', 'source': 'youtube', //vimeo, youtube or local 'width': 900, 'autoplayVideos': true, }); //======== Hero Slider var slider = new tns({ container: '.hero-slider', slideBy: 'page', autoplay: true, autoplayButtonOutput: false, mouseDrag: true, gutter: 0, items: 1, nav: false, controls: true, controlsText: [ '', '' ], responsive: { 1200: { items: 1, }, 992: { items: 1, }, 0: { items: 1, } } }); //======== Testimonial Slider var slider = new tns({ container: '.testimonial-slider', slideBy: 'page', autoplay: false, mouseDrag: true, gutter: 0, items: 1, nav: true, controls: false, controlsText: [ '', '' ], responsive: { 1200: { items: 1, }, 992: { items: 1, }, 0: { items: 1, } } }); //============== isotope masonry js with imagesloaded imagesLoaded('#container', function () { var elem = document.querySelector('.grid'); var iso = new Isotope(elem, { // options itemSelector: '.grid-item', masonry: { // use outer width of grid-sizer for columnWidth columnWidth: '.grid-item' } }); let filterButtons = document.querySelectorAll('.portfolio-btn-wrapper button'); filterButtons.forEach(e => e.addEventListener('click', () => { let filterValue = event.target.getAttribute('data-filter'); iso.arrange({ filter: filterValue }); }) ); });