~/.kube/config

(.kube/config에서 넘어옴)

1 개요[ | ]

~/.kube/config
  • kubectl의 설정파일
  • 엔드포인트, SSL 키, 컨텍스트 정보를 담고 있음
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNU1EVXlPREEyTVRneU1sb1hEVEk1TURVeU5UQTJNVGd5TWxvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBSzhkCmQrZXhzQStGQ2ZLVDg5MUhLZGJ2b0YxYXV4MFBmdXVkMWFnaWErSGxzNlFzcVczNVRvRk5MK256NzVDWWpacnYKNlNOb0RHVUFJUnR4VmlMUThLcFZOdjlXTEhFMEFhbmdrKzBQU0J5V0ZIa0prS084WE5oSmpJU1Y4R0NsUUtLagpaK2VrU2ZHZG1MK3U5K0xQNWJHc0NtbzVsUkFuZnlDYk5VblZwdUlZNzZEWVFjOENJUEdUZkY3R3ZrVGxNd2NTCjlySndRUDlwamR5YVFoRzdkRjUxbG1SQkZJcXoxKzRqNlRPYlNXOEVObEhaYXpRSENQZ1E5dy9nSi94Y1FIVDQKMWxtT0JpbC9Ocjk2UEN2UEpBZnNOVnB0U3ZERlVmRVYxZmV5K21NcFhvN2lqam5mT3BRUEJoL0NBcDRjd1owNgpHblIvZ24xaFd4cXh2cFdKdjJrQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFDQ0RoNjRDQmRPZTdaM0YyaEMwTENRTnRWTkEKaUI2Y05qeDVxTVJzaXI2N0FSR0wrTCt0elpXbzFEUHRPN285ZHA0T1FyRGJiTXpTQ3hQU21md3BCQzRGVGxZUQpOQkxTcmRmQ2tPY2diT05rUThyMG5NdGpYYmhiN3BXd3JjaTR5VFdzSjdpR0dRVkhGZG9qTzhEeDZ4K0NETEdSCkN2M3BGVUlDUlJUcDVnTzNWQkJkYUxxblhvNWk3TXFMVDhtR2dWWld1RlNNMGtyK1NJRUQxbnpTVkRRdktUMUIKTTFMRXFBYVFLd1kyd3FRY0NoejhmTy93RktUenYxSFg2TnZ1RGlLOW9sc0ZhZDFLejRIb2E4dzFTR1MwMlczVAovQXY0T0NmaUphRjhRUHBFZis3anJTUGxKd2JBekEzWXVVSWZrUVlWUHZoaHRad0RPY3JMTkpvOXRJbz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    server: https://172.20.0.150:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: kubernetes-admin
  name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJR3RtakhMK3UyN1l3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB4T1RBMU1qZ3dOakU0TWpKYUZ3MHlNREExTWpjd05qRTRNak5hTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTUvOXp0UzRvcFlPSzd3YlUKU1BoOWxUckFmdUV1WnlHR2llci94SWJTejlQYmxaOC9KSkFsb3NzWmpsdFpNQVFYTmFjeVNkVHJLZk1NcmdnMwp3UGNRTW1QV3pVe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CBSU0EgUFJJVkFURSBLRVktLS0tLQo=

root@centos7:~# cat ~/.kube/config | grep certificate-authority-data: | awk '{print $NF}' | base64 -d | openssl x509 -text | grep Certificate: -A12
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 0 (0x0)
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN=kubernetes
        Validity
            Not Before: May 28 06:18:22 2019 GMT
            Not After : May 25 06:18:22 2029 GMT
        Subject: CN=kubernetes
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
root@centos7:~# cat ~/.kube/config | grep client-certificate-data: | awk '{print $NF}' | base64 -d | openssl x509 -text | grep Certificate: -A12
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1934756858802658230 (0x1ad9a31cbfaedbb6)
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN=kubernetes
        Validity
            Not Before: May 28 06:18:22 2019 GMT
            Not After : May 27 06:18:23 2020 GMT
        Subject: O=system:masters, CN=kubernetes-admin
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}