Git Product home page Git Product logo

ckad's Introduction

CKAD

Brief Journey to achieve the CKAD Certification


The Linux Foundation - Domains & Competencies

My Study Plan

1 - Application Design And Build

2 - Application Deployment

3 - Application Observability And Maintenance

4 - Application Environment Configuration And Security

5 - Services And Networking

Tips & Shortcuts

  • DryRun alias:

    alias kdr="kubectl -o yaml --dry-run=client"
    • Pod example:

      kdr run mypod --image=busybox > busybox.yaml
    • Deploy example:

      kdr create deploy nginx --image=nginx:latest --replicas=2 > nginx-deploy.yaml
    • ConfigMap example:

      kdr create cm troy --from-literal=device=horse > troy-cm.yaml

Creating Services

In Kubernetes, you can create services using either the kubectl create service command or the kubectl expose command. While both commands can be used to create services, they have slightly different functionalities and use cases.

  1. kubectl create service
- This command is primarily used to create basic services quickly.
- It supports creating services of type ClusterIP, NodePort, and LoadBalancer.
- It automatically creates a service definition based on the specified parameters (service type, port mappings, etc.).
- It does not require a pre-existing service definition YAML file.

Example usage:

kubectl create service clusterip my-service --tcp=80:8080
  1. kubectl expose
- This command is more versatile and flexible compared to kubectl create service.
- It can be used to expose existing resources, including pods, deployments, and replication controllers, as services.
- It allows for more advanced customization of service configurations through flags and options.
- It can expose services of any type (ClusterIP, NodePort, LoadBalancer), and it can also update existing services.
- It requires a pre-existing resource (such as a deployment or pod) to expose as a service.
- It accepts a wider range of options and configurations, such as labels, annotations, and service types.

Example usage:

kubectl expose deployment my-deployment --port=80 --target-port=8080 --type=NodePort --name=my-service

ckad's People

Contributors

alexolinux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.