Skip to content

Instantly share code, notes, and snippets.

@yamamoto-febc
Last active May 8, 2018 06:27
Show Gist options
  • Save yamamoto-febc/09e650c030584f5050d79a64b6fa5357 to your computer and use it in GitHub Desktop.
Save yamamoto-febc/09e650c030584f5050d79a64b6fa5357 to your computer and use it in GitHub Desktop.
Rancher 2.0のデータストアを覗く方法 ref: https://qiita.com/yamamoto-febc/items/498b911611dd25351ad7
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher
# 起動したRancher2.0のコンテナIDを確認
$ docker ps
# execでコンテナ上でbash起動
$ docker exec -it <確認したコンテナID> bash
$ kubectl get crd
NAME AGE
apprevisions.project.cattle.io 3m
apps.project.cattle.io 3m
authconfigs.management.cattle.io 3m
catalogs.management.cattle.io 3m
clusteralerts.management.cattle.io 3m
clustercomposeconfigs.management.cattle.io 3m
clusterevents.management.cattle.io 3m
clusterloggings.management.cattle.io 3m
clusterpipelines.management.cattle.io 3m
clusterregistrationtokens.management.cattle.io 3m
clusterroletemplatebindings.management.cattle.io 3m
clusters.management.cattle.io 3m
dynamicschemas.management.cattle.io 3m
globalcomposeconfigs.management.cattle.io 3m
globalrolebindings.management.cattle.io 3m
globalroles.management.cattle.io 3m
groupmembers.management.cattle.io 3m
groups.management.cattle.io 3m
listenconfigs.management.cattle.io 3m
namespacecomposeconfigs.project.cattle.io 3m
nodedrivers.management.cattle.io 3m
nodepools.management.cattle.io 3m
nodes.management.cattle.io 3m
nodetemplates.management.cattle.io 3m
notifiers.management.cattle.io 3m
pipelineexecutionlogs.management.cattle.io 3m
pipelineexecutions.management.cattle.io 3m
pipelines.management.cattle.io 3m
podsecuritypolicytemplateprojectbindings.management.cattle.io 3m
podsecuritypolicytemplates.management.cattle.io 3m
preferences.management.cattle.io 3m
projectalerts.management.cattle.io 3m
projectloggings.management.cattle.io 3m
projectnetworkpolicies.management.cattle.io 3m
projectroletemplatebindings.management.cattle.io 3m
projects.management.cattle.io 3m
roletemplates.management.cattle.io 3m
settings.management.cattle.io 3m
sourcecodecredentials.management.cattle.io 3m
sourcecoderepositories.management.cattle.io 3m
templatecontents.management.cattle.io 3m
templates.management.cattle.io 3m
templateversions.management.cattle.io 3m
tokens.management.cattle.io 3m
users.management.cattle.io 3m
$ kubectl get <カスタムリソースの名前>
$ kubectl get settings.management.cattle.io
NAME AGE
agent-image 3m
cacerts 3m
cli-url-darwin 3m
cli-url-linux 3m
cli-url-windows 3m
engine-install-url 3m
engine-iso-url 3m
engine-newest-version 3m
engine-supported-range 3m
first-login 3m
helm-version 3m
ingress-ip-domain 3m
install-uuid 3m
k8s-version 3m
k8s-version-to-images 3m
machine-version 3m
server-image 3m
server-url 3m
server-version 3m
system-default-registry 3m
system-namespaces 3m
telemetry-opt 3m
ui-feedback-form 3m
ui-index 3m
ui-path 3m
ui-pl 3m
whitelist-domain 3m
# -oオプションでyaml形式を指定
$ kubectl get settings.management.cattle.io agent-image -o yaml
apiVersion: management.cattle.io/v3
customized: false
default: rancher/rancher-agent:master
kind: Setting
metadata:
clusterName: ""
creationTimestamp: 2018-05-07T10:47:27Z
deletionGracePeriodSeconds: null
deletionTimestamp: null
initializers: null
name: agent-image
namespace: ""
resourceVersion: "286"
selfLink: /apis/management.cattle.io/v3/agent-image
uid: 08abd93e-51e4-11e8-b695-0242ac110002
value: rancher/rancher-agent:v2.0.0
# watchオプションで変更検知
$ kubectl get settings.management.cattle.io -o yaml --watch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment