Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docs about enable kubectl logs feature #1914

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

YaozhongZhang
Copy link

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test
/kind feature

/kind documentation

What this PR does / why we need it:
restore docs about how to enable kubectl logs feature which is been deleted by mistake before

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@kubeedge-bot kubeedge-bot added the kind/documentation Categorizes issue or PR as related to documentation. label Jul 9, 2020
@kubeedge-bot kubeedge-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 9, 2020
@@ -95,6 +95,48 @@ Host has mosquit+ already installed and running. Hence skipping the installation
KubeEdge edgecore is running, For logs visit: /var/log/kubeedge/edgecore.log
```

### Enable `kubectl logs` Feature
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logs and metric feature ?

@fisherxu PTAL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kadisi ,metric may need wait for a new release of metric-server. Otherwise user need to make a choice between kubelet or edgecore.

```bash
wget https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/tools/certgen.sh
chmod +x certgen.sh
./certgen.sh stream
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where set this?

    if [ -z ${CLOUDCOREIPS} ]; then
        echo "You must set CLOUDCOREIPS Env,The environment variable is set to specify the IP addresses of all cloudcore"
        echo "If there are more than one IP need to be separated with space."
        exit 1
    fi

+ Set `CLOUDCOREIP` env. The environment variable is set to specify the IP address of cloudcore, or a VIP if you have a highly available cluster.

```bash
export CLOUDCOREIP="172.20.12.45"
Copy link
Member

@daixiang0 daixiang0 Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use your ip for safety, 192.168.0.1 is enough.

** Note: ** You need to set the cloudcoreip variable first

```bash
iptables -t nat -A OUTPUT -p tcp --dport 10350 -j DNAT --to $CLOUDCOREIP:10003
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10350 and 10003 is default value, need to comment which value they point.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daixiang0 Done. PTAL.

@GsssC GsssC mentioned this pull request Jul 13, 2020
@YaozhongZhang YaozhongZhang force-pushed the log-feature-doc-fix branch 2 times, most recently from 1f0fe1a to 5c43213 Compare July 16, 2020 07:18
@fisherxu
Copy link
Member

@YaozhongZhang Is it possible to enable logs feature in hack/local-up-kubeedge script?

@YaozhongZhang
Copy link
Author

YaozhongZhang commented Jul 16, 2020

@YaozhongZhang Is it possible to enable logs feature in hack/local-up-kubeedge script?

@fisherxu I can try it. Shoud I open another PR?

@fisherxu
Copy link
Member

@fisherxu I can try it. Shoud I open another PR?

Sure, another PR is fine

@@ -95,6 +95,49 @@ Host has mosquit+ already installed and running. Hence skipping the installation
KubeEdge edgecore is running, For logs visit: /var/log/kubeedge/edgecore.log
```

### Enable `kubectl logs` Feature
+ First , you need to make sure you can find the kubernetes `ca.crt` and `ca.key` files. If you set up your kubernetes cluster by `kubeadm` , those files will be in `/etc/kubernetes/pki/` dir.
Copy link
Member

@daixiang0 daixiang0 Jul 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to write in this format:

1. make sure  ...
2. set env ...
...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daixiang0 Done. PTAL.

@@ -95,6 +95,49 @@ Host has mosquit+ already installed and running. Hence skipping the installation
KubeEdge edgecore is running, For logs visit: /var/log/kubeedge/edgecore.log
```

### Enable `kubectl logs` Feature
1. Make sure you can find the kubernetes `ca.crt` and `ca.key` files. If you set up your kubernetes cluster by `kubeadm` , those files will be in `/etc/kubernetes/pki/` dir.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the ca.crt and ca.key used for here? @YaozhongZhang

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fisherxu They are used to sign the certificates used by CloudStream.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okey

@fisherxu
Copy link
Member

fisherxu commented Aug 7, 2020

/lgtm
/approve

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2020
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2020
@kubeedge-bot kubeedge-bot merged commit 39b02f9 into kubeedge:master Aug 7, 2020
@YaozhongZhang YaozhongZhang deleted the log-feature-doc-fix branch August 10, 2020 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants