Skip to content

Instantly share code, notes, and snippets.

@xwlee
Last active September 23, 2019 14:35
Show Gist options
  • Save xwlee/94d5ae152d3c9553f98ae2c3ffffb49f to your computer and use it in GitHub Desktop.
Save xwlee/94d5ae152d3c9553f98ae2c3ffffb49f to your computer and use it in GitHub Desktop.

Revisions

  1. xwlee revised this gist Sep 23, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -71,7 +71,7 @@ minikube ip
    kubectl scale deployment/web --replicas 2
    ```

    # Create template by creating a deployment and output the definition as yaml
    # Create a template by creating a deployment and output the definition as yaml

    ```shell
    kubectl create deployment web --image=nginx --dry-run -o yaml
  2. xwlee revised this gist Sep 23, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -75,4 +75,10 @@ kubectl scale deployment/web --replicas 2

    ```shell
    kubectl create deployment web --image=nginx --dry-run -o yaml
    ```

    # Create a deployment using config file

    ```shell
    kubectl apply -f <config>.yaml
    ```
  3. xwlee revised this gist Sep 23, 2019. No changes.
  4. xwlee revised this gist Sep 23, 2019. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -63,4 +63,16 @@ kubectl get svc

    ```shell
    minikube ip
    ```

    ## Scale the application

    ```shell
    kubectl scale deployment/web --replicas 2
    ```

    # Create template by creating a deployment and output the definition as yaml

    ```shell
    kubectl create deployment web --image=nginx --dry-run -o yaml
    ```
  5. xwlee revised this gist Sep 23, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -57,4 +57,10 @@ kubectl expose deployment/web --port 80 --type NodePort

    ```shell
    kubectl get svc
    ```

    ## Get the IP of the minikube cluster

    ```shell
    minikube ip
    ```
  6. xwlee revised this gist Sep 23, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -51,4 +51,10 @@ kubectl get pods -o wide

    ```shell
    kubectl expose deployment/web --port 80 --type NodePort
    ```

    ## Get the application exposed port

    ```shell
    kubectl get svc
    ```
  7. xwlee revised this gist Sep 23, 2019. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -38,4 +38,17 @@ kubectl get events

    ```shell
    kubectl get deploy
    ```

    ## Get the application pods info

    ```shell
    kubectl get pods
    kubectl get pods -o wide
    ```

    ## Expose the application through service

    ```shell
    kubectl expose deployment/web --port 80 --type NodePort
    ```
  8. xwlee revised this gist Sep 23, 2019. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -28,8 +28,14 @@ kubectl describe nodes
    kubectl create deployment web --image nginx
    ```

    ## Check the deployment status by querying the events
    ## Check what happen under the hood by querying the events

    ```shell
    kubectl get events
    ```

    ## Check the deployment status

    ```shell
    kubectl get deploy
    ```
  9. xwlee revised this gist Sep 23, 2019. 1 changed file with 11 additions and 5 deletions.
    16 changes: 11 additions & 5 deletions using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -1,29 +1,35 @@
    # Install minikube

    ```bash
    ```shell
    brew install minikube
    ```

    # Create minikube cluster

    ```bash
    ```shell
    minikube start
    ```

    # Get all nodes

    ```bash
    ```shell
    kubectl get nodes
    ```

    # Describe all nodes

    ```bash
    ```shell
    kubectl describe nodes
    ```

    # Deploy a simple application on minikube

    ```bash
    ```shell
    kubectl create deployment web --image nginx
    ```

    ## Check the deployment status by querying the events

    ```shell
    kubectl get events
    ```
  10. xwlee renamed this gist Sep 23, 2019. 1 changed file with 10 additions and 4 deletions.
    14 changes: 10 additions & 4 deletions setup-minikube-cluster.md → using-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,29 @@
    # Install minikube

    ```
    ```bash
    brew install minikube
    ```

    # Create minikube cluster

    ```
    ```bash
    minikube start
    ```

    # Get all nodes

    ```
    ```bash
    kubectl get nodes
    ```

    # Describe all nodes

    ```
    ```bash
    kubectl describe nodes
    ```

    # Deploy a simple application on minikube

    ```bash
    kubectl create deployment web --image nginx
    ```
  11. xwlee revised this gist Sep 23, 2019. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions setup-minikube-cluster.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,16 @@ brew install minikube

    ```
    minikube start
    ```

    # Get all nodes

    ```
    kubectl get nodes
    ```

    # Describe all nodes

    ```
    kubectl describe nodes
    ```
  12. xwlee renamed this gist Sep 23, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  13. xwlee created this gist Sep 23, 2019.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Install minikube

    ```
    brew install minikube
    ```

    # Create minikube cluster

    ```
    minikube start
    ```