0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

k8s command memo

Last updated at Posted at 2022-05-18

my memo

kubectl

cheat sheet

# view
$ kubectl config view
$ kubectl cluster-info
$ kubectl get namespace

# edit
$ kubectl create namespace <ns>
$ kubectl apply -n <ns> -f xxx

# config
$ kubectl config get-contexts
$ kubectl config use-context <context name>
$ kubectl config current-context

kind

Getting Start

$ kind get clusters
$ kind create cluster --name <cluster name> --config <yaml>
$ kind delete cluster --name <cluster name>>

# M1 mac の罠
$ kind create cluster --name xxxx --config xxx --image rossgeorgiev/kind-node-arm64:v1.21

k9s

command doc

$ k9s --readonly
$ k9s -n <namespace>

# k9s command
:ctx  context list
:ns   namespace list
:pod  pod list
:portfoword

l       log
y       yaml
ctrl-d  delete

docker container registory

api : Registry API

$ curl <host>:<port>/v2/_catalog
$ curl <host>:<port>/v2/<name>/tags/list
$ curl <host>:<port>/v2/<name>/manifest/<reference>

GKE

TODO

# add context
$ gcloud container clusters get-credentials



# mcs
$ kubectl describe serviceimport --context xxxx
$ kubectl describe serviceexport --context xxxx
$ kubectl get endpoints -n xxxx
$ kubectl describe endpoints -n xxxx <endpoint name>

minukube

TODO

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?