Tutorial Perintah Umum di Microk8s Kubernetes

Pada tutorial lanjutan kali ini, kita akan mengenal tutorial perintah umum dari penggunaan microk8s. Bagi yang belum menginstall microk8s, silakan lihat tutorial sebelumnya.

perintah pertama, cek status dari microk8s:

microk8s status

dengan hasil seperti ini:

microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none
addons:
  enabled:
    ha-cluster           # Configure high availability on the current node
  disabled:
    ambassador           # Ambassador API Gateway and Ingress
    cilium               # SDN, fast with full network policy
    dashboard            # The Kubernetes dashboard
    dns                  # CoreDNS
    fluentd              # Elasticsearch-Fluentd-Kibana logging and monitoring
    gpu                  # Automatic enablement of Nvidia CUDA
    helm                 # Helm 2 - the package manager for Kubernetes
    helm3                # Helm 3 - Kubernetes package manager
    host-access          # Allow Pods connecting to Host services smoothly
    ingress              # Ingress controller for external access
    istio                # Core Istio service mesh services
    jaeger               # Kubernetes Jaeger operator with its simple config
    keda                 # Kubernetes-based Event Driven Autoscaling
    knative              # The Knative framework on Kubernetes.
    kubeflow             # Kubeflow for easy ML deployments
    linkerd              # Linkerd is a service mesh for Kubernetes and other frameworks
    metallb              # Loadbalancer for your Kubernetes cluster
    metrics-server       # K8s Metrics Server for API access to service metrics
    multus               # Multus CNI enables attaching multiple network interfaces to pods
    portainer            # Portainer UI for your Kubernetes cluster
    prometheus           # Prometheus operator for monitoring and logging
    rbac                 # Role-Based Access Control for authorisation
    registry             # Private image registry exposed on localhost:32000
    storage              # Storage class; allocates storage from host directory
    traefik              # traefik Ingress controller for external access

Start Cluster

microk8s start

dengan hasil:

microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none

Stop Cluster

microk8s stop

List Node dari Cluster

microk8s kubectl get nodes

contoh outputnya:

sudo microk8s kubectl get nodes
NAME        STATUS   ROLES    AGE   VERSION
srv101149   Ready       13m   v1.20.0-37+7ab055a22f5440

Disable Cluster

sudo snap disable microk8s

Enable Cluster

sudo snap enable microk8s

Deploy Pods

microk8s kubectl create deployment my-redis --image=redis

List Pod dalam Cluster

microk8s kubectl get pods --all-namespaces

Wagiman Wiryosukiro

Petani Sistem Informasi, tukang las plugin & themes Wordpress. Co-Founder SistemInformasi.biz. Saat ini aktif sebagai Developer & kontributor di OpenMandriva Linux.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: